[cairo-commit] src/cairo-spans-compositor.c src/cairo-traps-compositor.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Feb 29 06:40:58 PST 2012


 src/cairo-spans-compositor.c |    3 +++
 src/cairo-traps-compositor.c |    3 +++
 2 files changed, 6 insertions(+)

New commits:
commit cdbf4c60fe373c896ac71e2f681e42744bcbd7e3
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 29 14:38:13 2012 +0000

    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 at chris-wilson.co.uk>

diff --git a/src/cairo-spans-compositor.c b/src/cairo-spans-compositor.c
index 8cc47c2..3b5604e 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 a822f8e..d93b057 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);


More information about the cairo-commit mailing list