summaryrefslogtreecommitdiff
path: root/src/cairo-path-fill.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-08-28 10:05:52 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-08-29 08:08:33 +0100
commit3f12d9ec5db1ac372742c3c03408bdaeaffdc1e4 (patch)
treea46be582bac6364db75df1c5c32ef79ab2538e2f /src/cairo-path-fill.c
parent2457c4bedef0447f7bff9b54dba96126010917ac (diff)
[clip] Use geometric clipping for unaligned clips
For the simple cases where the clip is an unaligned box (or boxes), apply the clip directly to the geometry and avoid having to use an intermediate clip-mask.
Diffstat (limited to 'src/cairo-path-fill.c')
-rw-r--r--src/cairo-path-fill.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cairo-path-fill.c b/src/cairo-path-fill.c
index 0cad156c0..d46917d55 100644
--- a/src/cairo-path-fill.c
+++ b/src/cairo-path-fill.c
@@ -160,8 +160,7 @@ _cairo_path_fixed_fill_to_traps (const cairo_path_fixed_t *path,
return CAIRO_STATUS_SUCCESS;
_cairo_polygon_init (&polygon);
- if (traps->has_limits)
- _cairo_polygon_limit (&polygon, &traps->limits);
+ _cairo_polygon_limit (&polygon, traps->limits, traps->num_limits);
status = _cairo_path_fixed_fill_to_polygon (path,
tolerance,
@@ -189,6 +188,7 @@ _cairo_path_fixed_fill_rectilinear_tessellate_to_region (const cairo_path_fixed_
cairo_fill_rule_t fill_rule,
const cairo_rectangle_int_t *extents)
{
+ cairo_box_t box;
cairo_polygon_t polygon;
cairo_traps_t traps;
cairo_status_t status;
@@ -196,10 +196,8 @@ _cairo_path_fixed_fill_rectilinear_tessellate_to_region (const cairo_path_fixed_
_cairo_polygon_init (&polygon);
if (extents != NULL) {
- cairo_box_t box;
-
_cairo_box_from_rectangle (&box, extents);
- _cairo_polygon_limit (&polygon, &box);
+ _cairo_polygon_limit (&polygon, &box, 1);
}
/* tolerance will be ignored as the path is rectilinear */