diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-24 18:10:43 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-24 18:10:43 +0100 |
commit | 8dc9139fb291605f93ce8409aa203c87d3a5d035 (patch) | |
tree | c1c2f98ff952d20c00bdddcf38d370a43c34c7c6 /src/cairo-surface-wrapper.c | |
parent | 15d5014efd8f3b4d01feb39259f2df0e69ac1b46 (diff) | |
download | cairo-8dc9139fb291605f93ce8409aa203c87d3a5d035.tar.gz |
recording: Combine the clip to the recording + target surface extents
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-surface-wrapper.c')
-rw-r--r-- | src/cairo-surface-wrapper.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/cairo-surface-wrapper.c b/src/cairo-surface-wrapper.c index df32837ab..59c87da4b 100644 --- a/src/cairo-surface-wrapper.c +++ b/src/cairo-surface-wrapper.c @@ -256,7 +256,7 @@ _cairo_surface_wrapper_fill_stroke (cairo_surface_wrapper_t *wrapper, cairo_fill_rule_t fill_rule, double fill_tolerance, cairo_antialias_t fill_antialias, - cairo_path_fixed_t *path, + const cairo_path_fixed_t*path, cairo_operator_t stroke_op, const cairo_pattern_t *stroke_source, const cairo_stroke_style_t *stroke_style, @@ -267,7 +267,7 @@ _cairo_surface_wrapper_fill_stroke (cairo_surface_wrapper_t *wrapper, const cairo_clip_t *clip) { cairo_status_t status; - cairo_path_fixed_t path_copy, *dev_path = path; + cairo_path_fixed_t path_copy, *dev_path = (cairo_path_fixed_t *)path; cairo_matrix_t dev_ctm = *stroke_ctm; cairo_matrix_t dev_ctm_inverse = *stroke_ctm_inverse; cairo_clip_t *dev_clip; @@ -494,15 +494,14 @@ _cairo_surface_wrapper_needs_device_transform (cairo_surface_wrapper_t *wrapper) } void -_cairo_surface_wrapper_set_extents (cairo_surface_wrapper_t *wrapper, - const cairo_rectangle_int_t *extents) +_cairo_surface_wrapper_intersect_extents (cairo_surface_wrapper_t *wrapper, + const cairo_rectangle_int_t *extents) { - if (extents != NULL) { + if (! wrapper->has_extents) { wrapper->extents = *extents; wrapper->has_extents = TRUE; - } else { - wrapper->has_extents = FALSE; - } + } else + _cairo_rectangle_intersect (&wrapper->extents, extents); wrapper->needs_transform = _cairo_surface_wrapper_needs_device_transform (wrapper); |