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<br>
fefefefe fefefefe fefefefe fefefefe fefefefe fefefefe fefefefe fefefefe 00000000 00000000 <br>All the other rows are fine.<br><br>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":<br>
<a href="http://cgit.freedesktop.org/pixman/commit/?id=1d89bac5a7a5693911d8a74701bd1c0292160478">http://cgit.freedesktop.org/pixman/commit/?id=1d89bac5a7a5693911d8a74701bd1c0292160478</a><br><br>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.<br>
<br>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.<br><br>Rob<br>-- <br>"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]