summaryrefslogtreecommitdiff
path: root/src/cairo-path-fill.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-08-24 07:06:32 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-08-29 08:08:32 +0100
commit85094c4eee4e50ec724bf1bb54ecff6f7c1014bf (patch)
tree43dda4b766dbc427e5e9d88d0bacde7fb161f0e2 /src/cairo-path-fill.c
parentff0ca6d02a2e8901e9cfca31326c3fdc16e77e2f (diff)
[clip] Eliminate redundant clips
First perform a simple geometric clip to catch the majority of cases where an unaligned clip has been set outside the operation extents that can be discarded without having to use an image surface. This causes a dramatic increase of over 13x for the poppler-bug-12266 trace and little impact elsewhere for more sensible clippers.
Diffstat (limited to 'src/cairo-path-fill.c')
-rw-r--r--src/cairo-path-fill.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cairo-path-fill.c b/src/cairo-path-fill.c
index b74bf0aa4..50cd2183a 100644
--- a/src/cairo-path-fill.c
+++ b/src/cairo-path-fill.c
@@ -157,6 +157,9 @@ _cairo_path_fixed_fill_to_traps (const cairo_path_fixed_t *path,
cairo_status_t status;
_cairo_polygon_init (&polygon);
+ if (traps->has_limits)
+ _cairo_polygon_limit (&polygon, &traps->limits);
+
status = _cairo_path_fixed_fill_to_polygon (path,
tolerance,
&polygon);