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

Michel Dänzer michel at daenzer.net
Wed Jun 29 01:23:30 UTC 2016


On 28.06.2016 18:50, Alexander E. Patrakov wrote:
> 28.06.2016 13:22, Michel Dänzer пишет:
>> 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.
> 
> I think that, if we want to check for pixel values that are clearly
> incompatible with premultiplied alpha, a better test would be to see if
> any non-alpha component is greater than the corresponding alpha, instead
> of limiting it to alpha == 0. Does it make sense?

I don't think it makes any difference in practice, unless you can point
me to any examples of cursor images where none of the pixels are
(supposed to be) fully transparent.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list