[cairo] Compile failing in xcb backend

Chris Wilson chris at chris-wilson.co.uk
Wed May 9 00:54:34 PDT 2007


James Cloos (cloos at jhcloos.com) said: 
[snip]
> diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
> index 304300a..385009c 100644
> --- a/src/cairo-xcb-surface.c
> +++ b/src/cairo-xcb-surface.c
> @@ -1584,16 +1584,16 @@ _cairo_xcb_surface_is_similar (void *surface_a,
>  {
>      cairo_xcb_surface_t *a = surface_a;
>      cairo_xcb_surface_t *b = surface_b;
> -    xcb_render_pictforminfo_t xrender_format;
> +    xcb_render_pictforminfo_t *xrender_format;
>  
> -    if (! _cairo_xcb_surface_same_screen (dst, src))
> +    if (! _cairo_xcb_surface_same_screen (a, b))
>  	return FALSE;
>  
>      /* now check that the target is a similar format */
>      xrender_format = _CAIRO_FORMAT_TO_XRENDER_FORMAT (b->dpy,
>  	    _cairo_format_from_content (content));
>  
> -    return a->xrender_format == xrender_format;
> +    return &a->xrender_format == xrender_format;
>  }

Ok, this doesn't quite have the desired effect. (Not that I can claim my
broken version was any better...)

Does xcb_render_util_find_standard_format() return a pointer to
permanently allocated memory? As xcb_surface_t copies the 
xcb_render_pictforminfo_t into an embedded structure, but
xcb_surface_font_private_t keeps a pointer. (Just wondering whether the
difference is significant.)
--
Chris Wilson


More information about the cairo mailing list