[cairo-commit] 2 commits - src/cairo-image-compositor.c src/cairo-spans-compositor.c src/cairo-xlib-surface-shm.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Oct 31 08:24:43 PDT 2012


 src/cairo-image-compositor.c |    3 ++-
 src/cairo-spans-compositor.c |   13 ++++++++++---
 src/cairo-xlib-surface-shm.c |    2 +-
 3 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit dbc0d83f2a7a0e6658f3b97b5f9921c44ef6a11f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Oct 31 15:18:21 2012 +0000

    image: Add a couple of tracepoints for spans fallbacks
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=56574
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
index 768e3a5..728f4a1 100644
--- a/src/cairo-image-compositor.c
+++ b/src/cairo-image-compositor.c
@@ -2716,7 +2716,8 @@ span_renderer_init (cairo_abstract_span_renderer_t	*_r,
     cairo_operator_t op = composite->op;
     cairo_int_status_t status;
 
-    TRACE ((stderr, "%s\n", __FUNCTION__));
+    TRACE ((stderr, "%s: antialias=%d, needs_clip=%d\n", __FUNCTION__,
+	    antialias, needs_clip));
 
     if (needs_clip)
 	return CAIRO_INT_STATUS_UNSUPPORTED;
diff --git a/src/cairo-spans-compositor.c b/src/cairo-spans-compositor.c
index ffbf56f..a2b88ef 100644
--- a/src/cairo-spans-compositor.c
+++ b/src/cairo-spans-compositor.c
@@ -557,8 +557,10 @@ composite_aligned_boxes (const cairo_spans_compositor_t		*compositor,
 
     TRACE ((stderr, "%s: need_clip_mask=%d, is-bounded=%d\n",
 	    __FUNCTION__, need_clip_mask, extents->is_bounded));
-    if (need_clip_mask && ! extents->is_bounded)
+    if (need_clip_mask && ! extents->is_bounded) {
+	TRACE ((stderr, "%s: unsupported clip\n", __FUNCTION__));
 	return CAIRO_INT_STATUS_UNSUPPORTED;
+    }
 
     no_mask = extents->mask_pattern.base.type == CAIRO_PATTERN_TYPE_SOLID &&
 	CAIRO_COLOR_IS_OPAQUE (&extents->mask_pattern.solid.color);
@@ -570,8 +572,10 @@ composite_aligned_boxes (const cairo_spans_compositor_t		*compositor,
 
     if (op == CAIRO_OPERATOR_SOURCE && (need_clip_mask || ! no_mask)) {
 	/* SOURCE with a mask is actually a LERP in cairo semantics */
-	if ((compositor->flags & CAIRO_SPANS_COMPOSITOR_HAS_LERP) == 0)
+	if ((compositor->flags & CAIRO_SPANS_COMPOSITOR_HAS_LERP) == 0) {
+	    TRACE ((stderr, "%s: unsupported lerp\n", __FUNCTION__));
 	    return CAIRO_INT_STATUS_UNSUPPORTED;
+	}
     }
 
     /* Are we just copying a recording surface? */
@@ -700,8 +704,10 @@ composite_boxes (const cairo_spans_compositor_t *compositor,
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
     _cairo_box_from_rectangle (&box, &extents->unbounded);
-    if (composite_needs_clip (extents, &box))
+    if (composite_needs_clip (extents, &box)) {
+	TRACE ((stderr, "%s: unsupported clip\n", __FUNCTION__));
 	return CAIRO_INT_STATUS_UNSUPPORTED;
+    }
 
     _cairo_rectangular_scan_converter_init (&converter, &extents->unbounded);
     for (chunk = &boxes->chunks; chunk != NULL; chunk = chunk->next) {
@@ -742,6 +748,7 @@ composite_polygon (const cairo_spans_compositor_t	*compositor,
 	(! _clip_is_region (extents->clip) || extents->clip->num_boxes > 1);
     TRACE ((stderr, "%s - needs_clip=%d\n", __FUNCTION__, needs_clip));
     if (needs_clip) {
+	TRACE ((stderr, "%s: unsupported clip\n", __FUNCTION__));
 	return CAIRO_INT_STATUS_UNSUPPORTED;
 	converter = _cairo_clip_tor_scan_converter_create (extents->clip,
 							   polygon,
commit 9b7ed9b2cd6c9ee4dfab71aed9b7d97b720fceb0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Oct 31 13:15:07 2012 +0000

    xlib/shm: Fix bogus assertion without shm available
    
    In particular note that _cairo_xlib_surface_put_shm is indeed called and
    is expected to be a no-op when shm is not available.
    
    Reported-by: Thomas Klausner <wiz at NetBSD.org>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
index 44e6284..0ca4305 100644
--- a/src/cairo-xlib-surface-shm.c
+++ b/src/cairo-xlib-surface-shm.c
@@ -55,7 +55,7 @@ _cairo_xlib_surface_get_shm (cairo_xlib_surface_t *surface,
 cairo_int_status_t
 _cairo_xlib_surface_put_shm (cairo_xlib_surface_t *surface)
 {
-    ASSERT_NOT_REACHED;
+    assert (!surface->fallback);
     return CAIRO_INT_STATUS_SUCCESS;
 }
 


More information about the cairo-commit mailing list