[cairo] Corrupt image rendering in 1.5.18
Owen Taylor
otaylor at redhat.com
Mon Apr 7 12:30:55 PDT 2008
On Mon, 2008-04-07 at 13:01 -0400, Owen Taylor wrote:
> The patch I'm suggesting is:
>
> https://bugs.freedesktop.org/attachment.cgi?id=15740
>
> It's a little bigger than I like for a tiny targeted fix ... more
> opportunity to mix x/y together,etc. But I didn't want to move
> around and modify the manually coded version of
> cairo_rectangle_intersect. But the actual logic change is very small.
>
> Assuming that testing doesn't reveal further problems, my instinct is
> that we should make this work rather than backing it out, but that
> may just be biased self-interest. (I'm trying to get stuff fixed for
> repeat NONE in the X server, and it's hard to use cairo based
> test cases if I have to tell people to use a custom cairo.)
So, examination of test suite results revealed further problems
with 1.5.18: for example the extend-reflect test has black or
alpha borders at the reflection points.
This turns out to be an X bug that I submitted a (now committed)
fix for a few days ago:
http://bugs.freedesktop.org/show_bug.cgi?id=15369
The X bug is that if you render an image without alpha with
the OVER operator, the X server was optimizing that to SOURCE.
Which isn't correct for extend=NONE, if the rendering goes
past the edges of the source image, since even though the
source surface is no-alpha, alpha is introduced for off-the
edge pixels.
This can be triggered in many cases by a pre-1.5.18 Cairo -
if you draw a rotated image in particular - but 1.5.18 triggers
it in the case of non-rotated images as well, which is a very
common case.
So I think we need to back out all these changes for 1.6; things
will be buggy, but in ways that apparently weren't bothering
people much.
The "going further" patch in:
http://bugs.freedesktop.org/show_bug.cgi?id=15367
makes things better for unscaled images. But scaled images will
still trigger the server bug. I think we should land it on
the 1.7 branch, maybe with a software fallback for transformed
no-alpha images and older servers.
- Owen
(I think scaled images will trigger the server bug with pre-1.5.18
as well, but in a more subtle way ... you'll get a slight
darkening on edges of a scaled image rather than a big black
strip)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cairographics.org/archives/cairo/attachments/20080407/783a2b7f/attachment.pgp
More information about the cairo
mailing list