Commit graph

5 commits

Author SHA1 Message Date
Chris Wilson
0770dda52b Split cairo-clip-privates into struct+inlines
References: https://bugs.freedesktop.org/show_bug.cgi?id=48577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-19 12:19:19 +01:00
Chris Wilson
94a9e06a93 clip: Intialise polygon fill-rule prior to use
The earliest use of the clip path's polygon fill rule is now for
intersecting the original polygon with the plurality of clip boxes.
However, the initialisation of the fill rule remained after the
intersection.

==8968== Conditional jump or move depends on uninitialised value(s)
==8968==    at 0x4C99449: _cairo_polygon_intersect (cairo-polygon-intersect.c:1382)
==8968==    by 0x4C9B788: _cairo_polygon_intersect_with_boxes.part.12 (cairo-polygon-intersect.c:1520)
==8968==    by 0x4C6AE6E: _cairo_clip_get_polygon (cairo-clip-polygon.c:104)
==8968==    by 0x4CAA667: clip_and_composite_boxes.part.13 (cairo-spans-compositor.c:773)
==8968==    by 0x4CAAD1D: clip_and_composite_boxes (cairo-spans-compositor.c:758)
==8968==    by 0x4CAB25C: _cairo_spans_compositor_fill (cairo-spans-compositor.c:1023)
==8968==    by 0x4C6CB69: _cairo_compositor_fill (cairo-compositor.c:184)
==8968==    by 0x4C7CE3E: _cairo_image_surface_fill (cairo-image-surface.c:945)
==8968==    by 0x4CAE2B6: _cairo_surface_fill (cairo-surface.c:2047)
==8968==    by 0x4C74AB7: _cairo_gstate_fill (cairo-gstate.c:1268)
==8968==    by 0x4C6E6D3: _cairo_default_context_fill (cairo-default-context.c:1009)
==8968==    by 0x4C67944: cairo_fill (cairo.c:2105)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-12 18:49:19 +00:00
Chris Wilson
d40b90a577 clip: Use the boxes-intersection routine for computing the clip polygon
If we have more than a single box, run the boxes intersection as a
post-processing step on the clip polygon, as it should be faster than
doing it inline.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-06 15:00:53 +00:00
Chris Wilson
d03b0057b2 observer: further classify general clips
A clip with only a single path or can be reduced to a single polygon are
easier to handle than a clip containing a mixture of paths (typically
ANTIALIAS_NONE vs ANTIALIAS_DEFAULT).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-18 12:37:57 +01:00
Chris Wilson
b132fae5e8 clip: Rudimentary support for clip-polygon extraction
Step 1, fix the failings sighted recently by tracking clip-boxes as an
explicit property of the clipping and of composition.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-19 21:14:34 +01:00