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

Chris Wilson ickle at kemper.freedesktop.org
Mon Oct 4 14:01:12 PDT 2010


 src/cairo-xcb-surface-render.c |   22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

New commits:
commit b6f830bab07e7e2ea7c3a8cb895d7a37c990c550
Author: Uli Schlachter <psychon at znc.in>
Date:   Mon Oct 4 18:11:50 2010 +0200

    xcb: Correctly clear the composite surface
    
    Calling _cairo_xcb_surface_render_paint() with CAIRO_OPERATOR_CLEAR and no clip
    just results in the surface's deferred_clear flag to be set to TRUE. Fix this by
    calling _cairo_xcb_surface_clear() directly instead.
    
    This half-fixes the clip-shape test in the test-suite. The difference to the
    reference image becomes much smaller at least. :(
    
    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 3b2b935..a3db489 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -1808,10 +1808,7 @@ _create_composite_mask (cairo_clip_t		*clip,
 						      surface->picture,
 						      clear, 1, &xrect);
     } else {
-	status = _cairo_xcb_surface_render_paint (surface,
-						  CAIRO_OPERATOR_CLEAR,
-						  &_cairo_pattern_clear.base,
-						  NULL);
+	status = _cairo_xcb_surface_clear (surface);
 	if (unlikely (status)) {
 	    cairo_surface_destroy (&surface->base);
 	    return (cairo_xcb_surface_t *) _cairo_surface_create_in_error (status);
commit 0a651b93a45f8c43399188a95870ca0055becced
Author: Uli Schlachter <psychon at znc.in>
Date:   Mon Oct 4 12:48:23 2010 +0200

    xcb: Fix compiler warning about unused result
    
    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 13528a6..3b2b935 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -2771,7 +2771,10 @@ _clip_and_composite_boxes (cairo_xcb_surface_t *dst,
     }
 
     if (dst->deferred_clear) {
-	_cairo_xcb_surface_clear (dst);
+	status = _cairo_xcb_surface_clear (dst);
+	if (unlikely (status)) {
+	    return status;
+	}
 
 	if (op == CAIRO_OPERATOR_OVER)
 	    op = CAIRO_OPERATOR_SOURCE;
commit be50c32ed594ccc90d6502c23cbf8c3d0f1dae67
Author: Uli Schlachter <psychon at znc.in>
Date:   Mon Oct 4 12:41:46 2010 +0200

    xcb: Fix CAIRO_OPERATOR_IN
    
    The if that is being removed here resulted in no drawing done at all when it
    skipped the call to _render_fill_boxes(). This is obviously not what
    CAIRO_OPERATOR_IN wants.
    
    This fixes the "operator" test in the test suite.
    
    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 e15f840..13528a6 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -2586,8 +2586,7 @@ _composite_boxes (cairo_xcb_surface_t *dst,
 	else
 	    color = &((cairo_solid_pattern_t *) src)->color;
 
-	if (! (op == CAIRO_OPERATOR_IN && color->alpha_short >= 0xff00))
-	    status = _render_fill_boxes (dst, op, color, boxes);
+	status = _render_fill_boxes (dst, op, color, boxes);
     }
     else
     {
commit c200560929f1d14667c9b2133a3591665f36c0d3
Author: Uli Schlachter <psychon at znc.in>
Date:   Sun Oct 3 21:15:07 2010 +0200

    XCB: Fix some weird code
    
    In the XCB backend, drawing a surface pattern always caused an extend of
    CAIRO_EXTEND_NONE to be used. This caused e.g. all the
    surface-pattern-scale-down-extend-* tests in the test suite to fail.
    
    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 8294a47..e15f840 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -1147,7 +1147,6 @@ _cairo_xcb_surface_picture (cairo_xcb_surface_t *target,
     cairo_surface_t *source = pattern->surface;
     cairo_xcb_picture_t *picture;
     cairo_filter_t filter;
-    cairo_extend_t extend;
     cairo_status_t status;
 
     if (source->is_clear) {
@@ -1412,13 +1411,7 @@ setup_picture:
 				   extents->y + extents->height/2.);
 
 
-    extend = pattern->base.extend;
-    if (extents->x >= 0 && extents->x + extents->width <= picture->width &&
-	extents->y >= 0 && extents->y + extents->height <= picture->height)
-    {
-	extend = CAIRO_EXTEND_NONE;
-    }
-    _cairo_xcb_picture_set_extend (picture, extend);
+    _cairo_xcb_picture_set_extend (picture, pattern->base.extend);
     _cairo_xcb_picture_set_component_alpha (picture, pattern->base.has_component_alpha);
 
     return picture;


More information about the cairo-commit mailing list