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

nerdopolis bluescreen_avenger at verizon.net
Wed May 20 15:36:02 PDT 2015


On Wednesday, May 20, 2015 12:17:42 PM Bill Spitzak wrote:
> 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);
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Hi.

I submitted a patch changing it to background-low-bpp

While the option might be slighty harder to guess, I think a boolean is better.
		Specifying the format will cause users to look up the names of the formats. 
		I don't know how many people would remember RGB565 

		Doing an integer for number of pixels might lead to attempts to set it at
		4, or 8, when it only supports 16 or 32 bit... 

It is unlikely that more bpp options will be used for just the weston background... 
It was only at low bpp to reduce memory usage on the Raspberry Pi...


More information about the wayland-devel mailing list