diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-15 15:09:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-15 15:29:15 +0100 |
commit | 1b2709d8c0933af254372c9b0d4fa5c011ef4586 (patch) | |
tree | cafda4f677eaa649509063855f866548938f5192 /src/cairo-composite-rectangles.c | |
parent | c0016e6ac9ca1382a7861d67f752dea9d66935de (diff) | |
download | cairo-1b2709d8c0933af254372c9b0d4fa5c011ef4586.tar.gz |
composite: Reduce an unaligned clip
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.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cairo-composite-rectangles.c b/src/cairo-composite-rectangles.c index a50a3474c..a6f37689a 100644 --- a/src/cairo-composite-rectangles.c +++ b/src/cairo-composite-rectangles.c @@ -371,20 +371,17 @@ _cairo_composite_rectangles_can_reduce_clip (cairo_composite_rectangles_t *compo cairo_clip_t *clip) { cairo_rectangle_int_t extents; + cairo_box_t box; if (clip == NULL) return TRUE; - /* XXX In the not a region case, we could still search through the boxes */ - if (! _cairo_clip_is_region (clip)) - return FALSE; - extents = composite->destination; if (composite->is_bounded & CAIRO_OPERATOR_BOUND_BY_SOURCE) _cairo_rectangle_intersect (&extents, &composite->source); if (composite->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) _cairo_rectangle_intersect (&extents, &composite->mask); - return cairo_region_contains_rectangle (_cairo_clip_get_region (clip), - &extents) == CAIRO_REGION_OVERLAP_IN; + _cairo_box_from_rectangle (&box, &extents); + return _cairo_clip_contains_box (clip, &box); } |