[cairo] Clip region problems
otaylor at redhat.com
Wed May 18 16:19:24 PDT 2005
On Wed, 2005-05-18 at 15:56 -0700, Bill Spitzak wrote:
> What happens if you create multiple cairo_surface_t objects for the same
> object? Is this supposed to work? (my guess is that it works for some
> backends, and not for others...)
> I'm thinking the correct answer is that you must create more than one
> cairo_surface_t if you want more than one thread to draw at the same
> time, and whether this is possible depends on the back end, though it
> should be supported for on-screen windows.
It certainly depends on the backend. The cross-backend rule will be
that if you modify the contents of a surface's underlying object by
accessing it other than through that surface, you are required to
call: (not yet existing functions)
cairo_surface_flush - before changing the surface outside Cairo
cairo_surface_mark_dirty - after changing the surface outside Cairo
This is needed for things like getPixels / putPixels fallbacks.
But you should be able to get away with multiple surfaces wrapping
the same pixmap or window in the case where you are using RENDER
to talk to the X server, since the X server will serve to serialize
> You should allow any number
> of readers at the same time on any cairo_surface_t as long as no writer
> is active.
This would require quite a bit of complexity, since we temporarily
modify internal attributes like filter and transform when using a
surface as a source.
> Wasn't there also a plan to make cairo_t and cairo_surface_t the same
> object (ie cairo_create(surface) would not exist, instead the surface
> itself can be used).
This idea was rejected as too big a change at this point (and also quite
likely not a good idea.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050518/c7f71407/attachment.pgp
More information about the cairo