[cairo] sharing a cairo_pattern_t across threads?

Adam Goode adam at spicenitz.org
Sat May 29 09:32:49 PDT 2010


Hi,

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?


Thanks,

Adam

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100529/c8162b16/attachment.pgp>


More information about the cairo mailing list