[Bug 92309] Box drawn around cursor in multiple 3D games

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Comment # 19 on bug 92309 from
I believe you can automatically detect invalid input in some cases. If you
receive an image in which R or G or B value is higher than A value, for any
available pixel, you can be certain that the image does not have premultiplied
alpha but straight alpha (this situation can never happen with premultiplied
alpha, by definition). You can then assume a developer mistake and "fix" the
image automatically. It might even resolve most of the usual cursor-related
mistakes (we can clearly see colored boxes, while it's expected to be
transparent, so those images have RGB>A for some pixels).

However, this has downsides as well. It does not cover all cases (for images
where all RGB are lower or equal to their respective A, you can't decide
whether it is premultiplied or straight). The automatic detection and
conversion might involve some performance hit. And it might not be a good API
design, because trying to be overly helpful often leads to lowered
predictability and more difficult debugging. But that would be someone else's
call.

I might also be talking utter nonsense because I have no expertise in graphics.


You are receiving this mail because:
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux