[cairo] rendering bug

Benjamin Otte otte at gnome.org
Mon Oct 29 14:56:34 PDT 2007


I have found a rare rendering bug in the xlib backend. It only happens
at a very specific scaling of the cairo context. If you want to
reproduce the original, get Swfdec and tennis.swf [1], resize it to
the same size as in this screenshot [2] and you will see the same
artifacts. Somehow, the topmost and leftmost pixel are not rendered.

As I knew you wouldn't like such a broad claim, I tried to cut it down
into a test, that test is attached. If you compare the output of
xlib-argb32 with the output of xlib-argb32-similar, you will notice
that the top- and leftmost lines are semi-transparent in one but not
the other test.

Excuse the output of that test, but it's autogenerated code that went
through my surgery. I have heavily patched Jeff's excellent
libcairowrap to capture the drawing output of cairo and emit it as C
code. So if you're interested in making test cases out of the stuff
your app draws, grab it at
git://people.freedesktop.org/~company/libcairowrap - it's very much a
work in progress, but I'll add features whenever I need to do a cairo


[1] http://www.onemorelevel.com/games2/tennis.swf
[2] http://people.freedesktop.org/~company/stuff/rendering-issue.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.c
Type: text/x-csrc
Size: 2338 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071029/bd474c19/attachment-0001.c 

More information about the cairo mailing list