[cairo] issue with rotated image sources

Benjamin Otte in7y118 at public.uni-hamburg.de
Sat Jan 20 03:37:55 PST 2007


On Sat, 20 Jan 2007, Carl Worth wrote:

> Thanks for the careful description, and the useful test case. I've
> verified the buggy behavior with LindowsRocks.swf and verified that it
> improves dramatically with your patch. So, well done!
>
> I do suspect that we should fix this at a layer above the surface
> backend. To that end, I tried to write a test case matching your
> description, (see attached), but this test passes with the xlib
> backend even without your patch. Do you have any insight into what
> else needs to happen to exercise this bug?
>
I played a bit with creating a test case myself back when I found the
issue and noticed that it didn't work to expose the behaviour with a
simple test. I didn't try any further because this was before pdiff and I
used romedalen.png, so the images were always wrong due to different
aliasing.
I don't remeber if I got a testcase working, but since I described it so
well, I would expect not. ;)

Now that I've written that, I just noticed that you use create_similar
while swfdec does use an image surface. I would suspect that your patch
results in _cairo_xlib_surface_clone_similar hitting the if (src->backend
== surface->base.backend ) part and not the second branch.

So I've just modified your test to use an RGB24 image surface instead.
I'll attach the 2 xlib images I've got here, those are both definitely
wrong, but like all code that does undefined calls into a backend with
varying implementations, YMMV. The attached results were generated with
EXA ati R100 on a PPC Xorg 7.1.1.

> It looks like I'll be making a 1.3.12 snapshot without having fixed
> this bug, but note that the bug has been added to the ROADMAP for the
> next (1.3.14) snapshot.
>
As long as it is in 1.4.0, I'll be happy. I've been a bit of a pest about
this bug since it is very visible in Flash renderings. And it's not just
rotated images, I also blame it for 1-pixel artifacts when rendering
images to non-integer coordinates, as can be seen on the big red buttons
at http://people.freedesktop.org/~company/stuff/youtube.png for example.
Those magically went away after I applied my patch.


Benjamin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rotate-similar-surface-paint-xlib-rgb24-out.png
Type: image/png
Size: 6515 bytes
Desc: xlib-rgb24
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070120/ae705a1d/rotate-similar-surface-paint-xlib-rgb24-out.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rotate-similar-surface-paint-xlib-argb32-out.png
Type: image/png
Size: 6942 bytes
Desc: xlib-argb32
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070120/ae705a1d/rotate-similar-surface-paint-xlib-argb32-out.png


More information about the cairo mailing list