[cairo] basic question?
Carl Worth
cworth at cworth.org
Tue Aug 18 14:25:35 PDT 2009
Excerpts from Charles سمير Doutriaux's message of Tue Aug 18 14:09:43 -0700 2009:
> On Aug 18, 2009, at 1:54 PM, David Björkevik wrote:
> > Charles سمير Doutriaux wrote:
> >> For speed reason I'm thinking it would be better to draw "in memory"
> >> on a cairo_image surface and then whenever I need to update copy the
> >> image back to my X11 window.
> >
> > This is not correct. When drawing through X, cairo uses XRENDER
> > which is
> > hardware accelerated (if your X driver supports it).
>
> Actually, speed is not the only issue, the way our software is
> designed there's a LOT of polygons to fill and it is more pleasant to
> the user to see the image pop up finished instead of looking at it
> being drawn.
OK, Charles, but you're the one who said "for speed reasons". :-)
As for not making the user look at the thing being drawn, you can also
do that with cairo-xlib by simply creating a Pixmap, directing cairo
at that, and finally copying the Pixmap to the Window when complete.
Of course, using a cairo_image_surface_t should work identically too.
The only result *should* be that the image surface is strictly slower
than the xlib surface, (though sometimes driver bugs do get in the way
and make xlib drawing slower than image).
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20090818/511b290e/attachment.pgp
More information about the cairo
mailing list