[cairo] Best strategy for complex screen drawing
Carl Worth
cworth at cworth.org
Mon Nov 21 06:47:41 PST 2005
On Sun, 20 Nov 2005 16:20:05 -0800, Vladimir Vukicevic wrote:
> > 2) Would it be more efficient to use a specific backend ? For example,
> > should I draw to an offscreen Xlib pixmap, and use it as a source
> > surface ? Will I benefit from possible render acceleration ?
>
> It would be more efficient to use a specific platform offscreen
> surface; the image surface is really the slowest possible path.
Yes. And also, you can create the intermediate surface using
cairo_surface_create_similar which will select a surface of the "best"
type given the eventual target surface.
Perhaps something like:
surface = cairo_surface_create_similar (cairo_get_target (cr),
CAIRO_CONTENT_COLOR_ALPHA,
width, height);
-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.freedesktop.org/archives/cairo/attachments/20051121/241b5de1/attachment.pgp
More information about the cairo
mailing list