diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-23 14:38:44 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-30 16:19:54 +0000 |
commit | 540f555840ba4076e3ab86669daf9bee5695afa2 (patch) | |
tree | 7100cb0ff551bd38a858e777a0722fa5cc46e5b8 | |
parent | 4b2998893930e4bab19646e6f0a0c8d2a47f12a2 (diff) |
[analysis] Only limit to mask extends if bounded by mask.
The extents of cairo_mask() is only limited to the mask if the operation
is bounded by the mask.
-rw-r--r-- | src/cairo-analysis-surface.c | 8 | ||||
-rw-r--r-- | test/clip-operator-pdf-argb32-ref.png | bin | 11145 -> 12125 bytes | |||
-rw-r--r-- | test/clip-operator-pdf-rgb24-ref.png | bin | 6530 -> 7367 bytes | |||
-rw-r--r-- | test/operator-clear-pdf-argb32-ref.png | bin | 1438 -> 1614 bytes | |||
-rw-r--r-- | test/operator-clear-pdf-rgb24-ref.png | bin | 1170 -> 1402 bytes | |||
-rw-r--r-- | test/operator-source-pdf-argb32-ref.png | bin | 4694 -> 5149 bytes | |||
-rw-r--r-- | test/operator-source-pdf-rgb24-ref.png | bin | 3848 -> 4354 bytes |
7 files changed, 6 insertions, 2 deletions
diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c index 90eb3f56..057be529 100644 --- a/src/cairo-analysis-surface.c +++ b/src/cairo-analysis-surface.c @@ -416,12 +416,16 @@ _cairo_analysis_surface_mask (void *abstract_surface, return status; is_empty = _cairo_rectangle_intersect (&extents, &source_extents); + } + + if (_cairo_operator_bounded_by_mask (op)) { + cairo_rectangle_int_t mask_extents; - status = _cairo_pattern_get_extents (mask, &source_extents); + status = _cairo_pattern_get_extents (mask, &mask_extents); if (status) return status; - is_empty = _cairo_rectangle_intersect (&extents, &source_extents); + is_empty = _cairo_rectangle_intersect (&extents, &mask_extents); } is_empty = _cairo_rectangle_intersect (&extents, &surface->current_clip); diff --git a/test/clip-operator-pdf-argb32-ref.png b/test/clip-operator-pdf-argb32-ref.png Binary files differindex b00cc00f..b3ee1437 100644 --- a/test/clip-operator-pdf-argb32-ref.png +++ b/test/clip-operator-pdf-argb32-ref.png diff --git a/test/clip-operator-pdf-rgb24-ref.png b/test/clip-operator-pdf-rgb24-ref.png Binary files differindex f9377fa0..b420f385 100644 --- a/test/clip-operator-pdf-rgb24-ref.png +++ b/test/clip-operator-pdf-rgb24-ref.png diff --git a/test/operator-clear-pdf-argb32-ref.png b/test/operator-clear-pdf-argb32-ref.png Binary files differindex d36de27f..06fc51e3 100644 --- a/test/operator-clear-pdf-argb32-ref.png +++ b/test/operator-clear-pdf-argb32-ref.png diff --git a/test/operator-clear-pdf-rgb24-ref.png b/test/operator-clear-pdf-rgb24-ref.png Binary files differindex 2dec75c8..55b44ad6 100644 --- a/test/operator-clear-pdf-rgb24-ref.png +++ b/test/operator-clear-pdf-rgb24-ref.png diff --git a/test/operator-source-pdf-argb32-ref.png b/test/operator-source-pdf-argb32-ref.png Binary files differindex 821112a6..f110ff2a 100644 --- a/test/operator-source-pdf-argb32-ref.png +++ b/test/operator-source-pdf-argb32-ref.png diff --git a/test/operator-source-pdf-rgb24-ref.png b/test/operator-source-pdf-rgb24-ref.png Binary files differindex 6faf143c..c6b71705 100644 --- a/test/operator-source-pdf-rgb24-ref.png +++ b/test/operator-source-pdf-rgb24-ref.png |