[cairo] pixman regression

Robert O'Callahan robert at ocallahan.org
Thu Mar 6 04:17:24 PST 2008


See attached test program. It renders an 8x8 rectangle to a target image
surface, where the source is a 10x10 solid white image pattern with source
matrix which is a translation by (0.5,0). With the latest pixman, the first
row of pixels is
fefefefe fefefefe fefefefe fefefefe fefefefe fefefefe fefefefe fefefefe
00000000 00000000
All the other rows are fine.

The first eight pixels should clearly be solid white, and they are in pixman
0.9.6, but they seem to have regressed in the commit "fix cairo's
a1-image-sample test":
http://cgit.freedesktop.org/pixman/commit/?id=1d89bac5a7a5693911d8a74701bd1c0292160478

The problem seems to be that the 0.5 horizontal translation makes pixman
take the fbFetchTransformed path. In fbFetchTransformed, the new code makes
us compute a transformed y coordinate (v.vector[1]) which is very slightly
less than 1/2. Then on the bilinear filter path we do "v.vector[1] -=
v.vector[2] / 2" which makes v.vector[1] very slightly negative, and I think
this makes us sample outside the image just a little bit.

Reverting that commit fixes this bug but presumably regresses other things.
I haven't studied pixman enough yet to come up with a real fix.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080307/fa42331e/attachment.htm 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.c
Url: http://lists.cairographics.org/archives/cairo/attachments/20080307/fa42331e/attachment-0001.txt 


More information about the cairo mailing list