[cairo-commit] src/cairo-clip.c

Benjamin Otte company at kemper.freedesktop.org
Wed Nov 25 07:13:02 PST 2009


 src/cairo-clip.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 3f0c9afa9760a90065c67927c63770f9bb8abe99
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Nov 25 15:57:46 2009 +0100

    [clip] Don't ignore outermost clip when it clips everything
    
    Fixes testcases clip-stroke-no-op and clip-fill-no-op added in
    0d8a04ef47426d87c7932f308a831e36b4ef7683

diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index fd1e9e8..8d66a5f 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -953,7 +953,7 @@ _cairo_clip_path_to_boxes (cairo_clip_path_t *clip_path,
 	    return status;
     }
 
-    while ((clip_path = clip_path->prev) != NULL) {
+    while (num_boxes > 0 && (clip_path = clip_path->prev) != NULL) {
 	cairo_box_t box;
 
 	if (clip_path->region != NULL) {
@@ -992,9 +992,6 @@ _cairo_clip_path_to_boxes (cairo_clip_path_t *clip_path,
 	    if (unlikely (status))
 		return status;
 	}
-
-	if (num_boxes == 0)
-	    break;
     }
 
     *count = num_boxes;


More information about the cairo-commit mailing list