[cairo] sharing a cairo_pattern_t across threads?
otte at redhat.com
Sun May 30 10:39:10 PDT 2010
The current stable release does not support using a signle surface from
multiple threads. We want to give you guarantees that allow using a
surface as a source in multiple threads, but that work is only in the
current unstable branch. It might not yet work for every backend, but
should work for the image backend.
See http://blogs.gnome.org/otte/2010/04/21/hacking-spree/ for a
discussion of those guarantees.
On Sat, 2010-05-29 at 12:32 -0400, Adam Goode wrote:
> I am using cairo in an environment that is multi-threaded. There is no
> sharing of the cairo_t objects, these each get created locally within
> each thread when needed.
> I typically draw from a shared pool of read-only image tiles. Right now,
> I do cairo_image_surface_create_for_data and then
> cairo_set_source_surface each time I need to draw.
> Is it possible for me to generate image surfaces (or better yet,
> patterns) and share those among cairo_t objects in different threads? I
> guess another way to ask it is: is a cairo_pattern_t an immutable object
> when used for drawing?
> cairo mailing list
> cairo at cairographics.org
More information about the cairo