[Pixman] [patch] pixman region _equal returns false for empty region

Benoit Girard bgirard at mozilla.com
Wed Mar 23 18:44:43 UTC 2016

>From https://bugzilla.mozilla.org/show_bug.cgi?id=1258558 .

Basically when you subtract the last rect from a pixman region the extends
will be empty but the x/y of the region wont be reset. This will cause
_equals to sometimes return false. This means that empty regions will
sometimes be equal, sometimes not. This can be caused simply by the order
in which you do the operations.

I'm not sure if the extends are meant to be (0,0,0,0) for empty region or
just have zero length. Given that the code appears to just assume zero
length I opted to fix _equal to special case empty region

Here's a patch against the mozilla tree which should rebase trivially:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pixman/attachments/20160323/dfb74d3d/attachment.html>

More information about the Pixman mailing list