From b8347e33539402ef64d652bc0f67522e4d02d51c Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 21 Nov 2010 00:37:29 +1030 Subject: [PATCH] PS: Fix regression - incorrect EPS bounding box https://bugs.freedesktop.org/show_bug.cgi?id=24688 (cherry picked from commit bb4055dac6a937b3412170a332b5effe4bbeff7d) --- src/cairo-analysis-surface.c | 40 +++++++++--------------------------- 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c index a61514903..6bec20511 100644 --- a/src/cairo-analysis-surface.c +++ b/src/cairo-analysis-surface.c @@ -438,27 +438,14 @@ _cairo_analysis_surface_stroke (void *abstract_surface, if (_cairo_operator_bounded_by_mask (op)) { cairo_rectangle_int_t mask_extents; + cairo_status_t status; - /* If the backend can handle the stroke, then mark the approximate - * extents of the operation. However, if we need to fallback in order - * to draw the stroke, then ensure that the fallback is as tight as - * possible -- both to minimise output file size and to ensure good - * quality printed output for neighbouring regions. - */ - if (backend_status == CAIRO_STATUS_SUCCESS) { - _cairo_path_fixed_approximate_stroke_extents (path, - style, ctm, - &mask_extents); - } else { - cairo_status_t status; - - status = _cairo_path_fixed_stroke_extents (path, style, - ctm, ctm_inverse, - tolerance, - &mask_extents); - if (unlikely (status)) - return status; - } + status = _cairo_path_fixed_stroke_extents (path, style, + ctm, ctm_inverse, + tolerance, + &mask_extents); + if (unlikely (status)) + return status; is_empty = _cairo_rectangle_intersect (&extents, &mask_extents); } @@ -503,16 +490,9 @@ _cairo_analysis_surface_fill (void *abstract_surface, if (_cairo_operator_bounded_by_mask (op)) { cairo_rectangle_int_t mask_extents; - /* We want speed for the likely case where the operation can be - * performed natively, but accuracy if we have to resort to - * using images. - */ - if (backend_status == CAIRO_STATUS_SUCCESS) { - _cairo_path_fixed_approximate_fill_extents (path, &mask_extents); - } else { - _cairo_path_fixed_fill_extents (path, fill_rule, tolerance, - &mask_extents); - } + _cairo_path_fixed_fill_extents (path, fill_rule, tolerance, + &mask_extents); + is_empty = _cairo_rectangle_intersect (&extents, &mask_extents); }