diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-18 12:37:57 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-18 12:37:57 +0100 |
commit | d03b0057b2865b2d51f80d874f030e52ee0c4aca (patch) | |
tree | 3531dc1b5f3a8a4b9f5517b99c7c159307884838 /src/cairo-surface-observer.c | |
parent | 76a3d0dc11624049115cf84859eec5168194e873 (diff) | |
download | cairo-d03b0057b2865b2d51f80d874f030e52ee0c4aca.tar.gz |
observer: further classify general clips
A clip with only a single path or can be reduced to a single polygon are
easier to handle than a clip containing a mixture of paths (typically
ANTIALIAS_NONE vs ANTIALIAS_DEFAULT).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-surface-observer.c')
-rw-r--r-- | src/cairo-surface-observer.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cairo-surface-observer.c b/src/cairo-surface-observer.c index 3bd968207..4baf709c9 100644 --- a/src/cairo-surface-observer.c +++ b/src/cairo-surface-observer.c @@ -197,11 +197,14 @@ add_clip (struct clip *stats, classify = 1; else if (clip->path == NULL) classify = 2; - else + else if (clip->path->prev == NULL) classify = 3; + else if (_cairo_clip_is_polygon (clip)) + classify = 4; + else + classify = 5; stats->type[classify]++; - } static void @@ -1029,7 +1032,9 @@ print_clip (cairo_output_stream_t *stream, const struct clip *c) "none", "region", "boxes", - "general path", + "single path", + "polygon", + "general", }; _cairo_output_stream_printf (stream, " clip:"); print_array (stream, c->type, names, ARRAY_LENGTH (names)); |