diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-08-27 14:46:16 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-05 16:11:09 +0100 |
commit | bc792a5e0e196dd9761649b14c9206465b42ef1d (patch) | |
tree | 78ffa8e991f1fed99a16fc06cce80bddb8d8a3b5 /src/cairo-shape-mask-compositor.c | |
parent | bdccf4fe51bca785f73205ccd26c4d020669e312 (diff) | |
download | cairo-bc792a5e0e196dd9761649b14c9206465b42ef1d.tar.gz |
surface: Merge scratch construction into _cairo_surface_create_scratch
We merge _cairo_surface_create_similar_scratch and
_cairo_surface_create_similar_solid into a single function named
_cairo_surface_create_scratch, to avoid confusion with
cairo_surface_create_similar which now will have a different
behaviour wrt the sizes and the device-scale.
_create_scratch assumes the width and height are in backend
coordinates, while create_similar does not.
Diffstat (limited to 'src/cairo-shape-mask-compositor.c')
-rw-r--r-- | src/cairo-shape-mask-compositor.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/cairo-shape-mask-compositor.c b/src/cairo-shape-mask-compositor.c index c2425b08c..3117267cc 100644 --- a/src/cairo-shape-mask-compositor.c +++ b/src/cairo-shape-mask-compositor.c @@ -62,10 +62,11 @@ _cairo_shape_mask_compositor_stroke (const cairo_compositor_t *_compositor, return CAIRO_INT_STATUS_UNSUPPORTED; TRACE ((stderr, "%s\n", __FUNCTION__)); - mask = _cairo_surface_create_similar_scratch (extents->surface, - CAIRO_CONTENT_ALPHA, - extents->bounded.width, - extents->bounded.height); + mask = _cairo_surface_create_scratch (extents->surface, + CAIRO_CONTENT_ALPHA, + extents->bounded.width, + extents->bounded.height, + NULL); if (unlikely (mask->status)) return mask->status; @@ -156,10 +157,11 @@ _cairo_shape_mask_compositor_fill (const cairo_compositor_t *_compositor, if (! extents->is_bounded) return CAIRO_INT_STATUS_UNSUPPORTED; - mask = _cairo_surface_create_similar_scratch (extents->surface, - CAIRO_CONTENT_ALPHA, - extents->bounded.width, - extents->bounded.height); + mask = _cairo_surface_create_scratch (extents->surface, + CAIRO_CONTENT_ALPHA, + extents->bounded.width, + extents->bounded.height, + NULL); if (unlikely (mask->status)) return mask->status; @@ -248,10 +250,11 @@ _cairo_shape_mask_compositor_glyphs (const cairo_compositor_t *_compositor, return CAIRO_INT_STATUS_UNSUPPORTED; TRACE ((stderr, "%s\n", __FUNCTION__)); - mask = _cairo_surface_create_similar_scratch (extents->surface, - CAIRO_CONTENT_ALPHA, - extents->bounded.width, - extents->bounded.height); + mask = _cairo_surface_create_scratch (extents->surface, + CAIRO_CONTENT_ALPHA, + extents->bounded.width, + extents->bounded.height, + NULL); if (unlikely (mask->status)) return mask->status; |