Skip to content

Commit

Permalink
[analysis] Only limit to mask extends if bounded by mask.
Browse files Browse the repository at this point in the history
The extents of cairo_mask() is only limited to the mask if the operation
is bounded by the mask.
  • Loading branch information
Chris Wilson committed Oct 30, 2008
1 parent 4b29988 commit 540f555
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cairo-analysis-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Binary file modified test/clip-operator-pdf-argb32-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/clip-operator-pdf-rgb24-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/operator-clear-pdf-argb32-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/operator-clear-pdf-rgb24-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/operator-source-pdf-argb32-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/operator-source-pdf-rgb24-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 540f555

Please sign in to comment.