summaryrefslogtreecommitdiff
path: root/src/cairo-composite-rectangles.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-27 11:35:40 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-27 11:35:40 +0100
commitef0b2e43ee299a1c2e7ecfbdf36a610c4ec53d0e (patch)
tree9cbbe2b44ccfc0a0b8c3edd11037e93ff0bbb7b9 /src/cairo-composite-rectangles.c
parent36536d3eb83a8f942bcf1afba4d0815fbeaca10f (diff)
downloadcairo-ef0b2e43ee299a1c2e7ecfbdf36a610c4ec53d0e.tar.gz
composite-rectangles: Update unbounded (clip extents) after reducing clip
So that the composite-rectangles remains consistent with the reduced clip in case the individual compositors try to optimise their rendering strategies based on the reduced clip and the overall extents. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-composite-rectangles.c')
-rw-r--r--src/cairo-composite-rectangles.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/cairo-composite-rectangles.c b/src/cairo-composite-rectangles.c
index c358671f5..c792985b0 100644
--- a/src/cairo-composite-rectangles.c
+++ b/src/cairo-composite-rectangles.c
@@ -130,6 +130,10 @@ _cairo_composite_rectangles_init_for_paint (cairo_composite_rectangles_t *extent
if (_cairo_clip_is_all_clipped (extents->clip))
return CAIRO_INT_STATUS_NOTHING_TO_DO;
+ if (! _cairo_rectangle_intersect (&extents->unbounded,
+ _cairo_clip_get_extents (extents->clip)))
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
if (extents->source_pattern.base.type != CAIRO_PATTERN_TYPE_SOLID)
_cairo_pattern_sampled_area (&extents->source_pattern.base,
&extents->bounded,
@@ -159,6 +163,10 @@ _cairo_composite_rectangles_intersect (cairo_composite_rectangles_t *extents,
if (_cairo_clip_is_all_clipped (extents->clip))
return CAIRO_INT_STATUS_NOTHING_TO_DO;
+ if (! _cairo_rectangle_intersect (&extents->unbounded,
+ _cairo_clip_get_extents (extents->clip)))
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
if (extents->source_pattern.base.type != CAIRO_PATTERN_TYPE_SOLID)
_cairo_pattern_sampled_area (&extents->source_pattern.base,
&extents->bounded,
@@ -219,6 +227,10 @@ _cairo_composite_rectangles_intersect_source_extents (cairo_composite_rectangles
if (_cairo_clip_is_all_clipped (extents->clip))
return CAIRO_INT_STATUS_NOTHING_TO_DO;
+ if (! _cairo_rectangle_intersect (&extents->unbounded,
+ _cairo_clip_get_extents (extents->clip)))
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
if (extents->source_pattern.base.type != CAIRO_PATTERN_TYPE_SOLID)
_cairo_pattern_sampled_area (&extents->source_pattern.base,
&extents->bounded,
@@ -277,6 +289,10 @@ _cairo_composite_rectangles_intersect_mask_extents (cairo_composite_rectangles_t
if (_cairo_clip_is_all_clipped (extents->clip))
return CAIRO_INT_STATUS_NOTHING_TO_DO;
+ if (! _cairo_rectangle_intersect (&extents->unbounded,
+ _cairo_clip_get_extents (extents->clip)))
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
if (extents->source_pattern.base.type != CAIRO_PATTERN_TYPE_SOLID)
_cairo_pattern_sampled_area (&extents->source_pattern.base,
&extents->bounded,
@@ -307,7 +323,6 @@ _cairo_composite_rectangles_init_for_mask (cairo_composite_rectangles_t *extents
return CAIRO_INT_STATUS_NOTHING_TO_DO;
}
-
extents->original_mask_pattern = mask;
_cairo_composite_reduce_pattern (mask, &extents->mask_pattern);
_cairo_pattern_get_extents (&extents->mask_pattern.base, &extents->mask);