-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Use object properties to configure platform implementations #363
Draft
aperezdc
wants to merge
3
commits into
master
Choose a base branch
from
aperezdc/plat-props-config
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aperezdc
requested review from
philn,
bertogg,
psaavedra,
zdobersek,
Cwiiis,
alexgcastro,
csaavedra and
carlosgcampos
September 24, 2021 23:27
aperezdc
force-pushed
the
aperezdc/plat-props-config
branch
5 times, most recently
from
October 6, 2022 08:58
904da7c
to
524f64f
Compare
This was referenced Jan 17, 2023
From a purely user perspective, this sounds very desirable (e.g. for our WPE snap package). |
aperezdc
force-pushed
the
aperezdc/plat-props-config
branch
from
September 25, 2023 21:40
524f64f
to
a3fd502
Compare
aperezdc
force-pushed
the
aperezdc/plat-props-config
branch
3 times, most recently
from
November 23, 2023 20:43
92e8c4e
to
10b5bbd
Compare
aperezdc
force-pushed
the
aperezdc/plat-props-config
branch
2 times, most recently
from
November 30, 2023 19:20
e62433e
to
e027ced
Compare
aperezdc
force-pushed
the
aperezdc/plat-props-config
branch
from
December 18, 2023 08:34
e027ced
to
ca60557
Compare
aperezdc
force-pushed
the
aperezdc/plat-props-config
branch
from
January 3, 2024 20:47
ca60557
to
df2ee42
Compare
aperezdc
force-pushed
the
aperezdc/plat-props-config
branch
from
March 6, 2024 16:00
df2ee42
to
126a761
Compare
Add a new cog_apply_properties_from_key_file() function which iterates over writable properties of an object and sets their values from the items of a GKeyFile group with the same names as the properties. The goal is to use this to ease picking configuration options for the different platform modules--as long as they define their settings as properties of some object.
Turn the settings for atomic mode setting and the device scale factor into properties of the CogDrmPlatform class. This allows using cog_apply_properties_from_key_file() to automatically apply the settings from the configuration file. In the future it may be possible to also pass properties when creating an object with cog_platform_new(), and/or via the "params" argument of cog_platform_setup(), and always using the same mechanism (object properties) regardless of where the values come from.
Move the routine from the DRM plugin used to parse a comma-separated key=value set of parameters into cog_key_file_parse_params_string() which sets values into a GKeyFile. This allows building up the final set of options into the configuration object held by CogShell, then using that as canonical source for reading options.
aperezdc
force-pushed
the
aperezdc/plat-props-config
branch
from
March 21, 2024 17:49
126a761
to
7c8d26d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an initial RFC to steer towards improving how platform modules are configured. The main idea is to turn options into properties of the
CogPlatform
subclass implemented by the platform module.The information about object properties/settings can then be inspected e.g. at run time and used in different ways:
cog_platform_new_with_options()
function.…and probably others.