From a8232ff77cc6eff866494c5a408d914907d643ad Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 16 Aug 2011 17:18:09 +0100 Subject: observer: only print out the non-zero path types Signed-off-by: Chris Wilson --- src/cairo-surface-observer.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/cairo-surface-observer.c') diff --git a/src/cairo-surface-observer.c b/src/cairo-surface-observer.c index 314d0e4c7..364447bc5 100644 --- a/src/cairo-surface-observer.c +++ b/src/cairo-surface-observer.c @@ -1010,13 +1010,16 @@ static void print_path (cairo_output_stream_t *stream, const struct path *p) { - _cairo_output_stream_printf (stream, - " path: %d empty, %d pixel-aligned, %d rectilinear, %d straight, %d curved\n", - p->type[0], - p->type[1], - p->type[2], - p->type[3], - p->type[4]); + static const char *names[] = { + "empty", + "pixel-aligned", + "rectliinear", + "straight", + "curved", + }; + _cairo_output_stream_printf (stream, " path:"); + print_array (stream, p->type, names, ARRAY_LENGTH (names)); + _cairo_output_stream_printf (stream, "\n"); } static void -- cgit v1.2.1