Rework the workaround for bogus X server images.
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Tue, 21 Jul 2009 03:46:06 +0000 (23:46 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Tue, 21 Jul 2009 05:27:46 +0000 (01:27 -0400)
commit6bd17f1e9861693262fa88bfeff5d3279b3f6e7d
treea6e655493387a897ed9ba53f482e6b11317bea56
parentdfdb8509e2160a0db7d72e775dd348090e6fb968
Rework the workaround for bogus X server images.

Bug 22844 demonstrates that it is not sufficient to play tricks with
the clip regions to work around the bogus images from the X
server. The problem there is that if the operation hits the general
path and the destination has a different format than a8r8g8b8, the
destination pixels will be fetched into a temporary array. But because
those pixels would be outside the clip region, they would be fetched
as black. The previous workaround was relying on fast paths fetching
those pixels without checking the clip region.

In the new scheme we work around the problem at the
pixman_image_composite() level. If an image is determined to need a
work around, we translate both the bits pointer, the coordinates, and
the clip region, thus effectively undoing the X server's broken
computation.
pixman/pixman-bits-image.c
pixman/pixman-utils.c
pixman/pixman.c
test/window-test.c