[PATCH xserver 3/3] render: Fix default picture format initialization

Keith Packard keithp at keithp.com
Fri Feb 23 23:58:21 UTC 2018


Michel Dänzer <michel at daenzer.net> writes:

> On 2018-02-22 10:53 PM, Adam Jackson wrote:
>> "depth" for a picture format is the sum of bits of a/r/g/b, and not x.
>> The default format list was creating an x8r8g8b8 format at depth 32,
>> which is wrong. Likewise, servers supporting depth 30 would get an
>> x8r8g8b8 format at depth 30, which is nonsense.
>
> Actually, the former isn't wrong, and the latter might not be either, I
> think. These are the constraints:
>
> * The sizes of a/x+r+g+b must equal bpp
> * The sizes of a+r+g+b must be <= depth (or == ?)

We could make it ==, but we currently make it <= so that you can have
r8g8b8 on depth 32, and r4g4b4 on depth 15 and 16.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20180223/d111e810/attachment.sig>


More information about the xorg-devel mailing list