diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-11 15:37:35 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-29 08:08:33 +0100 |
commit | 4bf96bad9697cbe67907df69d40f46d8d7f24325 (patch) | |
tree | 5b188989e7850aa66278399827200df4f0178be2 /src/cairo-surface-fallback.c | |
parent | 30e5fa0ce06b2572f09f3d47ee10b692f18ba0ae (diff) | |
download | cairo-4bf96bad9697cbe67907df69d40f46d8d7f24325.tar.gz |
[fill] Use trivial rectilinear_to_traps
Avoid a small amount of unnecessary overhead by performing a simple
conversion of the path to traps when it consists solely of simple boxes.
Diffstat (limited to 'src/cairo-surface-fallback.c')
-rw-r--r-- | src/cairo-surface-fallback.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c index 32db7fbd2..4dc8ebbc4 100644 --- a/src/cairo-surface-fallback.c +++ b/src/cairo-surface-fallback.c @@ -1193,6 +1193,20 @@ _cairo_surface_fallback_fill (cairo_surface_t *surface, _cairo_polygon_init (&polygon); _cairo_polygon_limit (&polygon, boxes, num_boxes); + if (path->is_empty_fill) + goto DO_TRAPS; + + if (path->is_rectilinear) { + status = _cairo_path_fixed_fill_rectilinear_to_traps (path, + fill_rule, + &traps); + if (likely (status == CAIRO_STATUS_SUCCESS)) + goto DO_TRAPS; + + if (_cairo_status_is_error (status)) + goto CLEANUP; + } + status = _cairo_path_fixed_fill_to_polygon (path, tolerance, &polygon); if (unlikely (status)) goto CLEANUP; |