[cairo] Bug in _cairo_xlib_surface_create_similar

Owen Taylor otaylor at redhat.com
Mon Feb 20 14:03:01 PST 2006


On Tue, 2006-02-21 at 10:26 +1300, Robert O'Callahan wrote:
> I recently discovered that cairo_create_similar on a 16-bit xlib surface
> creates a surface backed by a 24-bit pixmap. This results in absymal
> performance --- I can actually watch a copy from the similar to the
> original move down the screen, on my dual Xeon, NVidia vendor driver
> machine. It also means xlib-based code like GTK themes can't render to
> the surface because it doesn't match the screen depth.
> 
> The attached patch makes _cairo_xlib_surface_create_similar match the
> characteristics of the input surface as closely as I know how, and fixes
> my issues. Please evaluate...

No real opinion on the patch, one way or the other. Strong opinion
that you need to file a bug with NVidia; even if they can't accelerate
drawing to the surface (limitations of XAA), they definitely should
be able to copy to the screen with high performance.

Well, actually one opinion on the patch, from a quick glance.
It's very much wrong to create an image surface when you can't
create a surface with matching depth... let the X server decide
it can't accelerate that.

						Owen




More information about the cairo mailing list