[cairo] image memory alternatives

Krzysztof Kosiński tweenk.pl at gmail.com
Wed Aug 18 11:22:07 PDT 2010


2010/8/18 M.R. <makrober at gmail.com>:
> I assume that method (1) will be preferred if there is a lot of drawing to
> be done, since back-end driver can use graphics device memory and
> hardware-accelerated primitives.

The image surface does not use any kind of hardware acceleration. It
is a pure software renderer. (Interestingly it's often faster than the
hardware-accelerated surfaces at the moment.) There will be no
difference in performance when you create the surface in shared
memory.

To use hardware acceleration, you need to explicitly use one of the
hardware-accelerated backends, for example cairo-gl. Those backends
don't allow direct access to pixel values, so you'll have to use
cairo_set_source_surface and paint the contents to an image surface
held in shared memory.

Regards, Krzysztof


More information about the cairo mailing list