[PATCH] desktop-shell: support an option to use 16 bit color or not, instead of using it by default

Bill Spitzak spitzak at gmail.com
Wed May 20 12:17:42 PDT 2015


That name is pretty confusing and not what anybody would guess. It 
certainly should start with "background-" so that it matches all the 
other switches that control the desktop image.

The fact that it does not always work does NOT have to be part of the name.

Some ideas I prefer:

background-depth=16
background-format=RGB565

The fact that it takes a number or name does not mean you have to worry 
about any values other than the one you are interested in. In particular 
if a depth is used just use 'background_depth <= 16' to choose whether 
to try RGB565. If a format name is used I think you can insist the only 
ones that do not produce an error are "RGB565" and "". Future versions 
can then enhance this with obvious additions, rather than being forced 
to add even more switches.

I am also annoyed that the keywords have dashes in them (thus requiring 
the C variable that stores the value to have a different name) but that 
seems to be well-established here...

On 05/20/2015 04:55 AM, nerdopolis wrote:

>   	s = weston_config_get_section(desktop->config, "shell", NULL, NULL);
> +	weston_config_section_get_bool(s, "background-low-bitrate",
> +					 &background->low_bitrate, NULL);



More information about the wayland-devel mailing list