[cairo] Bug with downscaled xlib->xlib painting?

Kalle Vahlman kalle.vahlman at gmail.com
Sun Oct 21 10:58:10 PDT 2007


I'm hitting a bug with downscaled xlib to xlib surface transfers where
the result of cairo_paint() looks as if it is started from negative

The code (attached) takes a X11 window, creates surface from it (using
the gdk helpers) and paints it in different scales onto the
applications window. Note that you'll need to be running a composite
manager while testing ('xcompanager -a' for example) to get meaningful

As seen in the screenshot[1], the 1:1 copy is ok but each of the
downscaled versions show different level of unwanted "drifting".

Testing this a bit in various ways I've found that the bug isn't there if I
 - if I paint it to an image surface and save it as a png
 - create an intermediate surface with create_similar() for the transfer

but window -> window is exhibiting this buggy behaviour consistently.

I haven't dug into the code yet to try to determine what's up, so if
anyone has good hunches I'm all ears...

 [1] http://iki.fi/zuh/cairo-scale-bug.png

Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-scale-bug.c
Type: text/x-csrc
Size: 2325 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071021/4fe3dea9/attachment.c 

More information about the cairo mailing list