[cairo-commit] 2 commits - src/cairo-meta-surface.c src/cairo-path-fixed.c

Adrian Johnson ajohnson at kemper.freedesktop.org
Fri Mar 14 07:08:39 PDT 2008


 src/cairo-meta-surface.c |   14 +++++---------
 src/cairo-path-fixed.c   |    6 ++++--
 2 files changed, 9 insertions(+), 11 deletions(-)

New commits:
commit 112bbacea3c06f844af400f34a4a2eadf25d13dd
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Mar 15 00:28:21 2008 +1030

    Don't use fill-stroke during analysis
    
    Instead ensure the fill and stroke are each analyzed separately.
    
    This fixes a bug in the PS output where if a fill-stroke with a
    translucent fill resulted in a fallback image with the stroke clipped
    to the fill path.

diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index 66849b4..441a7d6 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -743,7 +743,11 @@ _cairo_meta_surface_replay_internal (cairo_surface_t	     *surface,
 	{
 	    cairo_command_t *stroke_command;
 
-	    stroke_command = (i < num_elements - 1) ? elements[i + 1] : NULL;
+	    if (type != CAIRO_META_CREATE_REGIONS)
+		stroke_command = (i < num_elements - 1) ? elements[i + 1] : NULL;
+	    else
+		stroke_command = NULL;
+
 	    if (stroke_command != NULL &&
 		type == CAIRO_META_REPLAY && region != CAIRO_META_REGION_ALL)
 	    {
@@ -783,14 +787,6 @@ _cairo_meta_surface_replay_internal (cairo_surface_t	     *surface,
 						     stroke_command->stroke.tolerance,
 						     stroke_command->stroke.antialias);
 		i++;
-		if (type == CAIRO_META_CREATE_REGIONS) {
-		    if (status == CAIRO_STATUS_SUCCESS) {
-			stroke_command->header.region = CAIRO_META_REGION_NATIVE;
-		    } else if (status == CAIRO_INT_STATUS_IMAGE_FALLBACK) {
-			stroke_command->header.region = CAIRO_META_REGION_IMAGE_FALLBACK;
-			status = CAIRO_STATUS_SUCCESS;
-		    }
-		}
 	    } else
 		status = _cairo_surface_fill (target,
 					      command->fill.op,
commit 112b43452d302eb4ac62a20bca01bdecbfdcaaf5
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Mar 15 00:18:59 2008 +1030

    Fix bug in _cairo_path_fixed_is_equal
    
    Ensure the entire path is compared.

diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c
index 55229da..75a76d0 100644
--- a/src/cairo-path-fixed.c
+++ b/src/cairo-path-fixed.c
@@ -613,8 +613,10 @@ _cairo_path_fixed_is_equal (cairo_path_fixed_t *path,
 	if (other_buf == NULL ||
 	    path_buf->num_ops != other_buf->num_ops ||
 	    path_buf->num_points != other_buf->num_points ||
-	    memcmp (path_buf->op, other_buf->op, path_buf->num_ops) != 0 ||
-	    memcmp (path_buf->points, other_buf->points, path_buf->num_points != 0))
+	    memcmp (path_buf->op, other_buf->op,
+		    sizeof (cairo_path_op_t) * path_buf->num_ops) != 0 ||
+	    memcmp (path_buf->points, other_buf->points,
+		    sizeof (cairo_point_t) * path_buf->num_points) != 0)
 	{
 	    return FALSE;
 	}


More information about the cairo-commit mailing list