diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-10 14:03:10 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-10 14:06:16 +0100 |
commit | deb88cca133b4f6ae89061662c06bca0c0573d0e (patch) | |
tree | 4361de90ebdcf36ec50215a899e19f696b554dcb | |
parent | 69c1ec9f131936ca5fcdb48bd0f957b2c1f6d52c (diff) |
recording: do not reduce required clips
When painting with an unbound source, we would miss that the clip
extents were smaller than the mask extents and remove the solitary clip
(believing we were bound by a tight mask). For painting this is
obviously wrong, and due to a combination of bugs that set the mask to
the bound extents and then the failure to spot when that mask was larger
than the clip.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/cairo-composite-rectangles.c | 2 | ||||
-rw-r--r-- | src/cairo-recording-surface.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-composite-rectangles.c b/src/cairo-composite-rectangles.c index 0598ba698..439f453bd 100644 --- a/src/cairo-composite-rectangles.c +++ b/src/cairo-composite-rectangles.c @@ -90,7 +90,7 @@ _cairo_composite_rectangles_init_for_paint (cairo_composite_rectangles_t *extent return CAIRO_INT_STATUS_NOTHING_TO_DO; } - extents->mask = extents->bounded; + extents->mask = *unbounded; extents->clip = _cairo_clip_reduce_for_composite (clip, extents); if (_cairo_clip_is_all_clipped (extents->clip)) diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c index 478695f8c..987395bf1 100644 --- a/src/cairo-recording-surface.c +++ b/src/cairo-recording-surface.c @@ -587,6 +587,8 @@ _command_init (cairo_recording_surface_t *surface, /* steal the clip */ command->clip = NULL; if (! _cairo_clip_is_region (composite->clip) || + composite->mask.width > composite->unbounded.width || + composite->mask.height > composite->unbounded.height || cairo_region_contains_rectangle (_cairo_clip_get_region (composite->clip), &composite->unbounded) != CAIRO_REGION_OVERLAP_IN) { |