[cairo-commit] 2 commits - src/cairo-xcb-surface.c src/cairo-xcb-surface-render.c

Uli Schlachter psychon at kemper.freedesktop.org
Thu Sep 22 12:20:50 PDT 2011


 src/cairo-xcb-surface-render.c |    3 ++-
 src/cairo-xcb-surface.c        |   12 ++++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit aa16e3e66621099f4edc59802614d804e86e63ec
Author: Uli Schlachter <psychon at znc.in>
Date:   Thu Sep 22 21:18:57 2011 +0200

    xcb: Honor clips for defer clear
    
    This bug was accidentally introduced in fd613cb9f94daff0c8d4fdb27ff89894d41682a.
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 0cb7e15..00bbaa1 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -3429,7 +3429,8 @@ _cairo_xcb_surface_render_paint (cairo_xcb_surface_t	*surface,
 	return CAIRO_INT_STATUS_UNSUPPORTED;
     }
 
-    if (source->type == CAIRO_PATTERN_TYPE_SOLID &&
+    if (composite->clip == NULL &&
+	source->type == CAIRO_PATTERN_TYPE_SOLID &&
 	(op == CAIRO_OPERATOR_SOURCE ||
 	 op == CAIRO_OPERATOR_CLEAR ||
 	 (surface->base.is_clear &&
commit 87fdc4356f5ba48c84269c956fecb9467b95f1af
Author: Uli Schlachter <psychon at znc.in>
Date:   Thu Sep 22 20:46:24 2011 +0200

    xcb: Don't try to fallback more than once
    
    This fixes the following assert for pretty much every single xcb-fallback test:
    
    cairo-xcb-surface.c:320: _get_image: Assertion `surface->fallback == ((void *)0)' failed.
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index b3ca319..9664303 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -781,6 +781,14 @@ _cairo_xcb_surface_fallback (cairo_xcb_surface_t *surface,
     cairo_image_surface_t *image;
     cairo_status_t status;
 
+    status = _cairo_composite_rectangles_add_to_damage (composite,
+							&surface->fallback_damage);
+    if (unlikely (status))
+	    return _cairo_surface_create_in_error (status);
+
+    if (surface->fallback)
+	return surface->fallback;
+
     image = (cairo_image_surface_t *)
 	    _get_image (surface, TRUE, 0, 0, surface->width, surface->height);
 
@@ -791,10 +799,6 @@ _cairo_xcb_surface_fallback (cairo_xcb_surface_t *surface,
 	surface->fallback = image;
     }
 
-    status = _cairo_composite_rectangles_add_to_damage (composite,
-							&surface->fallback_damage);
-    if (unlikely (status))
-	    return _cairo_surface_create_in_error (status);
     return &surface->fallback->base;
 }
 


More information about the cairo-commit mailing list