[cairo] Bug in _cairo_xlib_surface_create_similar

Carl Worth cworth at cworth.org
Thu May 18 14:27:59 PDT 2006


On Fri, 19 May 2006 08:26:08 +1200, Robert O'Callahan wrote:
> My response was (and is) that the patch doesn't do that. If we can't
> match the visual and depth, we fall back to
> _cairo_xlib_surface_create_similar_with_format, i.e. the existing
> behaviour.

Sorry about that. I should have looked closer at the patch and seen
that that is obviously the case.

I've now pushed the patch out.

-Carl

commit ea05e027111d5f336b7e3f2170f929b0b1e37692
Author: Robert O'Callahan <rocallahan at novell.com>
Date:   Fri May 19 08:26:08 2006 +1200

    [xlib] Have create_similar try harder to create the right surface
    
    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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060518/256cbf4e/attachment.pgp


More information about the cairo mailing list