[cairo] 1.6: cairo_xlib_surface_get_xrender_format

Carl Worth cworth at cworth.org
Mon Jan 28 14:41:07 PST 2008


On Mon, 28 Jan 2008 16:50:06 -0500, Behdad Esfahbod wrote:
> Sounds good.  I'd replace "Render extension" by "X Render
> extension".

Done.

> > +    /* And also for an xlib surface that is not an xlib-xrender
> > surface */
> > +    if (xlib_surface->xrender_format == NULL)
> > +       _cairo_error_throw (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
>
> I don't think an error should be thrown in this case.

Note that my comment above is stale. I wrote that when I thought that
xlib_surface->xrender_format would be NULL for any surface created
with cairo_xlib_surface_create. But in fact, xrender_format will never
be NULL as long as the X Render extension is available.

So yeah, given that, the SURFACE_TYPE_MISMATCH is pretty bogus. I
think I'll just delete the above comment and error. So then we'll just
silently return NULL, (exactly as documented), if the extension isn't
available.

> You can also test the no-xrender case in your test case by calling
> cairo_boilerplate_xlib_surface_disable_render().

Good point. I'll try that.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080128/b8254793/attachment.pgp 


More information about the cairo mailing list