Skip to content
Commit b45c74f0 authored by Michel Dänzer's avatar Michel Dänzer Committed by Adam Jackson
Browse files

dix: Work around non-premultiplied ARGB cursor data harder

Turns out some apps (e.g. the Civilization VI game) use
non-premultiplied cursor data which doesn't have any pixels with 0 alpha
but non-0 non-alpha, but can still result in visual artifacts.

This uses the method suggested by Kamil in
https://bugs.freedesktop.org/92309#c19: check for pixels where any
colour component value is larger than the alpha value, which isn't
possible with premultiplied alpha.

There can still be non-premultiplied data which won't be caught by this,
but that should result in slightly incorrect colours and/or blending at
the worst, not wildly incorrect colours such as shown in the bug report
below.

Bugzilla: https://bugs.freedesktop.org/108355


Suggested-by: default avatarKamil Paral <kamil.paral@gmail.com>
parent 248d164e
Loading
Loading
Loading
Pipeline #6813 passed with stage
in 2 minutes and 28 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment