[cairo] Clip region problems

Owen Taylor otaylor at redhat.com
Wed Apr 27 08:33:58 PDT 2005

On Fri, 2005-03-11 at 16:04 -0500, Owen Taylor wrote:
>  * For exact rectangular clips, we change the clip region on the
>    destination surface, but we don't necessarily reset it
>    when we are done drawing to the surface.
>    We also don't do anything to guard against the same surface
>    being used as the target of two cairo_t, or the target of
>    a cairo_t and a source for drawing to another cairo_t.
>  * In libpixman and Render, a clip region set on a source affects
>    rendering... clipped pixels are treated as fully transparent.
>    This isn't particularly useful behavior, but because of the
>    above problems, it will leak out and affect Cairo rendering
>    in some cases.
> So, how do we fix these problems? Ideas:


>  4. Only allow a surface to be used for a single thing at a same time
>      - two cairo_t's cannot be active for the same target surface
>      - a surface that is the target of a cairo_t cannot be used
>        as a source.
>     Pro: Simple
>     Con: Fairly big restriction

Would it be OK if I implemented this for now? Leaked clips are
biting me a lot in GTK+. 

We can always relax the restriction later.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050427/d07eda28/attachment.pgp

More information about the cairo mailing list