diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-11 13:34:29 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-29 08:08:33 +0100 |
commit | a1e0c4b30980d624bb3e015b7dcf39b4a2ef8c56 (patch) | |
tree | a4ac7e28003d805d0a51085c85cb231bb1d998de /src/cairo-surface-fallback.c | |
parent | 3f12d9ec5db1ac372742c3c03408bdaeaffdc1e4 (diff) | |
download | cairo-a1e0c4b30980d624bb3e015b7dcf39b4a2ef8c56.tar.gz |
[clip] Combine directly onto target
Where it is unlikely that we will reuse the temporary clip surface,
combine the clip directly with the mask.
Diffstat (limited to 'src/cairo-surface-fallback.c')
-rw-r--r-- | src/cairo-surface-fallback.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c index 14d94fd71..32db7fbd2 100644 --- a/src/cairo-surface-fallback.c +++ b/src/cairo-surface-fallback.c @@ -163,30 +163,8 @@ _create_composite_mask_pattern (cairo_surface_pattern_t *mask_pattern, if (unlikely (status)) goto CLEANUP_SURFACE; - if (clip_surface) { - cairo_surface_pattern_t pattern; - cairo_surface_t *surface; - - surface = _cairo_clip_get_surface (clip, mask); - _cairo_pattern_init_for_surface (&pattern, surface); - cairo_surface_destroy (surface); - - status = _cairo_surface_composite (CAIRO_OPERATOR_IN, - &pattern.base, - NULL, - mask, - extents->x - clip->path->extents.x, - extents->y - clip->path->extents.y, - 0, 0, - 0, 0, - extents->width, extents->height, - NULL); - - _cairo_pattern_fini (&pattern.base); - - if (unlikely (status)) - goto CLEANUP_SURFACE; - } + if (clip_surface) + status = _cairo_clip_combine_with_surface (clip, mask); _cairo_pattern_init_for_surface (mask_pattern, mask); |