[PATCH RFC xserver] dix: Work around non-premultiplied ARGB cursor data

Eric Anholt eric at anholt.net
Thu Jul 14 19:40:44 UTC 2016


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

> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Some games incorrectly use non-premultiplied ARGB cursor data, presumably
> because that's what Windows uses. On some hardware (and with SWcursor),
> this breaks areas of the cursor which are supposed to be transparent
> (and presumably also translucent areas, but that's less noticeable).
>
> This change checks for pixels with alpha == 0 and any non-alpha component
> != 0. If any such pixel is found, the data is assumed to be
> non-premultiplied and fixed up by multiplying the RGB components with the
> alpha component.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92309
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
>
> I'm on the fence about whether this is a good or bad idea.

This seems like a good idea to me: Make our software do something
sensible when given data that makes no sense any other way.  "But we
should just make the app developers fix their stuff!" never works.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160714/64c22e92/attachment.sig>


More information about the xorg-devel mailing list