[cairo-commit] 2 commits - src/cairo-analysis-surface.c src/cairo-ps-surface.c

Adrian Johnson ajohnson at kemper.freedesktop.org
Sat Nov 20 06:09:31 PST 2010


 src/cairo-analysis-surface.c |   40 ++++++++++------------------------------
 src/cairo-ps-surface.c       |    9 ---------
 2 files changed, 10 insertions(+), 39 deletions(-)

New commits:
commit bb4055dac6a937b3412170a332b5effe4bbeff7d
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun Nov 21 00:37:29 2010 +1030

    PS: Fix regression - incorrect EPS bounding box
    
        https://bugs.freedesktop.org/show_bug.cgi?id=24688

diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c
index a615149..6bec205 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);
     }
 
commit d3746448d78fcedf8f8f9a7d0fca47f1bd6a5b67
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Nov 20 23:54:00 2010 +1030

    PS: Fix regression - missing page content in EPS output
    
    https://bugs.freedesktop.org/show_bug.cgi?id=24688

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index fe20b69..03c1fa0 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -3517,9 +3517,6 @@ _cairo_ps_surface_paint (void			*abstract_surface,
     if (unlikely (status))
 	return status;
 
-    if (! _cairo_rectangle_intersect (&extents.bounded, &surface->page_bbox))
-	return CAIRO_STATUS_SUCCESS;
-
     if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
 	return _cairo_ps_surface_analyze_operation (surface, op, source, &extents.bounded);
 
@@ -3588,9 +3585,6 @@ _cairo_ps_surface_stroke (void			*abstract_surface,
     if (unlikely (status))
 	return status;
 
-    if (! _cairo_rectangle_intersect (&extents.bounded, &surface->page_bbox))
-	return CAIRO_STATUS_SUCCESS;
-
     /* use the more accurate extents */
     if (extents.is_bounded) {
 	status = _cairo_path_fixed_stroke_extents (path, style,
@@ -3652,9 +3646,6 @@ _cairo_ps_surface_fill (void		*abstract_surface,
     if (unlikely (status))
 	return status;
 
-    if (! _cairo_rectangle_intersect (&extents.bounded, &surface->page_bbox))
-	return CAIRO_STATUS_SUCCESS;
-
     /* use the more accurate extents */
     if (extents.is_bounded) {
 	_cairo_path_fixed_fill_extents (path,


More information about the cairo-commit mailing list