summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-29 14:38:13 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-29 14:40:06 +0000
commitcdbf4c60fe373c896ac71e2f681e42744bcbd7e3 (patch)
treef2b5dbd2a51e3a36b2f568782ec7704e0087a3d8 /src
parent300e32a4a9d79c26077f33e9b67bad2106071849 (diff)
downloadcairo-cdbf4c60fe373c896ac71e2f681e42744bcbd7e3.tar.gz
spans,traps-compositor: Check for all-clipped after intersecting clip with boxes
If the mask does not intersect the clip, then there is no drawing to be performed and we can report NOTHING_TO_DO. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/cairo-spans-compositor.c3
-rw-r--r--src/cairo-traps-compositor.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/cairo-spans-compositor.c b/src/cairo-spans-compositor.c
index 8cc47c285..3b5604e6a 100644
--- a/src/cairo-spans-compositor.c
+++ b/src/cairo-spans-compositor.c
@@ -717,6 +717,9 @@ clip_and_composite_boxes (const cairo_spans_compositor_t *compositor,
clip = _cairo_clip_copy (extents->clip);
clip = _cairo_clip_intersect_boxes (clip, boxes);
+ if (_cairo_clip_is_all_clipped (clip))
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
status = _cairo_clip_get_polygon (clip, &polygon,
&fill_rule, &antialias);
_cairo_clip_path_destroy (clip->path);
diff --git a/src/cairo-traps-compositor.c b/src/cairo-traps-compositor.c
index a822f8e05..d93b0576f 100644
--- a/src/cairo-traps-compositor.c
+++ b/src/cairo-traps-compositor.c
@@ -1635,6 +1635,9 @@ clip_and_composite_boxes (const cairo_traps_compositor_t *compositor,
clip = _cairo_clip_copy (extents->clip);
clip = _cairo_clip_intersect_boxes (clip, boxes);
+ if (_cairo_clip_is_all_clipped (clip))
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
status = _cairo_clip_get_polygon (clip, &polygon,
&fill_rule, &antialias);
_cairo_clip_path_destroy (clip->path);