[cairo] _cairo_gstate_clip issues
Robert O'Callahan
rocallahan at novell.com
Mon May 9 15:54:29 PDT 2005
_cairo_gstate_init_copy lets the copied gstate share a reference to the
original clip.surface. But in _cairo_gstate_clip, if clip.surface is
non-null then we just draw into it. Shouldn't there be some
copy-on-write code here to create a new copy of the surface if it's
shared and draw into that? Otherwise popping the gstate can't properly
restore the original clip.
I've been having some problems with non-pixel-aligned clip rects. It
seems to have been a big cause of the performance problems I was seeing,
with all those extra composites clip surfaces induce. Life is much
better now that I'm pixel-aligning my clip rects and the pixman region
code is used instead. However (1) I won't always be able to do that when
I start rotating content and (2) I have been seeing bugs where clip
surfaces don't clip as much as they should (not explained by the
copy-on-write problem, of course) ... I'll try to track it down.
Rob
More information about the cairo
mailing list