[cairo] cairo_xlib_surface_set_drawable

Bill Spitzak spitzak at d2.com
Fri Jul 8 14:27:50 PDT 2005



Keith Packard wrote:
> I chatted with Carl on the phone and he thought the idea of extending
> the xlib backend for this double buffering case seemed reasonable
> enough; swapping out the drawable is necessary as X cannot resize
> pixmaps.  He did, however, suggest that perhaps the correct API would be
> more like:
> 
> void
> cairo_xlib_surface_set_drawable (cairo_surface_t *surface,
>                                  Drawable         drawable,
>                                  int              width,
>                                  int              height);
> 
> I've got the obvious patch which implements this function; are there
> other comments in this area?

If the Drawable is the same as before I hope this is just as efficient 
as cairo_xlib_surface_set_size(). One way to make sure is to perhaps get 
rid of the set_size() call and only provide this one.

It would be nice to provide similar functions for the Win32 and any 
other window system back-ends. Even though the Win32 version requires 
you to destroy and create a HGC to change, this has to be more efficient 
that destroying and recreating the entire cairo_t.




More information about the cairo mailing list