[cairo-commit] 2 commits - src/cairo-clip-boxes.c src/cairo-win32-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Jul 20 02:58:49 PDT 2011


 src/cairo-clip-boxes.c    |    5 ++++-
 src/cairo-win32-surface.c |   12 ++++--------
 2 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit b419fdcacd636dc2274695f922f758a8b521ca01
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jul 20 10:53:19 2011 +0100

    clip-boxes: Intersection with 0 boxes means clip-all
    
    Fixes clip-fill-no-op
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c
index aa560ce..95ed265 100644
--- a/src/cairo-clip-boxes.c
+++ b/src/cairo-clip-boxes.c
@@ -259,9 +259,12 @@ _cairo_clip_intersect_boxes (cairo_clip_t *clip,
     cairo_boxes_t clip_boxes;
     cairo_rectangle_int_t extents;
 
-    if (boxes->num_boxes == 0)
+    if (_cairo_clip_is_all_clipped (clip))
 	return clip;
 
+    if (boxes->num_boxes == 0)
+	return _cairo_clip_set_all_clipped (clip);
+
     if (clip == NULL)
 	clip = _cairo_clip_create ();
 
commit 41190afacfb53eebc2e47d6d5924c91080293e7f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jul 20 10:30:19 2011 +0100

    win32: Fixup clip-mask fallback after API changes
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index 45c809f..cb2b95b 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -1566,15 +1566,11 @@ _cairo_win32_surface_show_glyphs_internal (void			 *surface,
      * doing this for printing */
     if (clip != NULL) {
 	if ((dst->flags & CAIRO_WIN32_SURFACE_FOR_PRINTING) == 0) {
-	    cairo_region_t *clip_region;
-	    cairo_status_t status;
+	    if (! _cairo_clip_is_region (clip))
+		return CAIRO_INT_STATUS_UNSUPPORTED;
 
-	    clip_region = _cairo_clip_get_region (clip);
-	    assert (status != CAIRO_INT_STATUS_NOTHING_TO_DO);
-	    if (status)
-		return status;
-
-	    _cairo_win32_surface_set_clip_region (surface, clip_region);
+	    _cairo_win32_surface_set_clip_region (surface,
+						  _cairo_clip_get_region (clip));
 	}
     }
 


More information about the cairo-commit mailing list