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-clip-surface.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-clip-surface.c')
-rw-r--r-- | src/cairo-clip-surface.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cairo-clip-surface.c b/src/cairo-clip-surface.c index fff972403..85feaa649 100644 --- a/src/cairo-clip-surface.c +++ b/src/cairo-clip-surface.c @@ -132,11 +132,11 @@ _cairo_clip_get_surface (const cairo_clip_t *clip, cairo_path_fixed_t path; int i; - surface = _cairo_surface_create_similar_solid (target, - CAIRO_CONTENT_ALPHA, - clip->extents.width, - clip->extents.height, - CAIRO_COLOR_TRANSPARENT); + surface = _cairo_surface_create_scratch (target, + CAIRO_CONTENT_ALPHA, + clip->extents.width, + clip->extents.height, + CAIRO_COLOR_TRANSPARENT); if (unlikely (surface->status)) return surface; @@ -162,11 +162,11 @@ _cairo_clip_get_surface (const cairo_clip_t *clip, return _cairo_surface_create_in_error (status); } } else { - surface = _cairo_surface_create_similar_solid (target, - CAIRO_CONTENT_ALPHA, - clip->extents.width, - clip->extents.height, - CAIRO_COLOR_WHITE); + surface = _cairo_surface_create_scratch (target, + CAIRO_CONTENT_ALPHA, + clip->extents.width, + clip->extents.height, + CAIRO_COLOR_WHITE); if (unlikely (surface->status)) return surface; } |