From eafa127001319942e2a5e2009979e3ffd36320ed Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 21 Mar 2012 20:07:55 +0000 Subject: [PATCH] compositor: Add tracing for damage Signed-off-by: Chris Wilson --- src/cairo-compositor.c | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/src/cairo-compositor.c b/src/cairo-compositor.c index 56e46ef1b..a633aa2e5 100644 --- a/src/cairo-compositor.c +++ b/src/cairo-compositor.c @@ -67,9 +67,14 @@ _cairo_compositor_paint (const cairo_compositor_t *compositor, compositor = compositor->delegate; } while (status == CAIRO_INT_STATUS_UNSUPPORTED); - if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) + if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) { + TRACE ((stderr, "%s: applying damage (%d,%d)x(%d, %d)\n", + __FUNCTION__, + extents.unbounded.x, extents.unbounded.y, + extents.unbounded.width, extents.unbounded.height)); surface->damage = _cairo_damage_add_rectangle (surface->damage, &extents.unbounded); + } _cairo_composite_rectangles_fini (&extents); @@ -103,9 +108,14 @@ _cairo_compositor_mask (const cairo_compositor_t *compositor, compositor = compositor->delegate; } while (status == CAIRO_INT_STATUS_UNSUPPORTED); - if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) + if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) { + TRACE ((stderr, "%s: applying damage (%d,%d)x(%d, %d)\n", + __FUNCTION__, + extents.unbounded.x, extents.unbounded.y, + extents.unbounded.width, extents.unbounded.height)); surface->damage = _cairo_damage_add_rectangle (surface->damage, &extents.unbounded); + } _cairo_composite_rectangles_fini (&extents); @@ -147,9 +157,14 @@ _cairo_compositor_stroke (const cairo_compositor_t *compositor, compositor = compositor->delegate; } while (status == CAIRO_INT_STATUS_UNSUPPORTED); - if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) + if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) { + TRACE ((stderr, "%s: applying damage (%d,%d)x(%d, %d)\n", + __FUNCTION__, + extents.unbounded.x, extents.unbounded.y, + extents.unbounded.width, extents.unbounded.height)); surface->damage = _cairo_damage_add_rectangle (surface->damage, &extents.unbounded); + } _cairo_composite_rectangles_fini (&extents); @@ -187,9 +202,14 @@ _cairo_compositor_fill (const cairo_compositor_t *compositor, compositor = compositor->delegate; } while (status == CAIRO_INT_STATUS_UNSUPPORTED); - if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) + if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) { + TRACE ((stderr, "%s: applying damage (%d,%d)x(%d, %d)\n", + __FUNCTION__, + extents.unbounded.x, extents.unbounded.y, + extents.unbounded.width, extents.unbounded.height)); surface->damage = _cairo_damage_add_rectangle (surface->damage, &extents.unbounded); + } _cairo_composite_rectangles_fini (&extents); @@ -229,9 +249,14 @@ _cairo_compositor_glyphs (const cairo_compositor_t *compositor, compositor = compositor->delegate; } while (status == CAIRO_INT_STATUS_UNSUPPORTED); - if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) + if (status == CAIRO_INT_STATUS_SUCCESS && surface->damage) { + TRACE ((stderr, "%s: applying damage (%d,%d)x(%d, %d)\n", + __FUNCTION__, + extents.unbounded.x, extents.unbounded.y, + extents.unbounded.width, extents.unbounded.height)); surface->damage = _cairo_damage_add_rectangle (surface->damage, &extents.unbounded); + } _cairo_composite_rectangles_fini (&extents);