diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-14 00:43:09 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-14 12:37:57 +0100 |
commit | 6b3d53646eb7aa3f13a0a6d133ec2ffcd1df8fdd (patch) | |
tree | d1bfd282026b281fdb9923b4bc81f94d31e4b322 /src/cairo-image-surface.c | |
parent | 8a90b22897b6460b3396b9959383131039bd9ce2 (diff) | |
download | cairo-6b3d53646eb7aa3f13a0a6d133ec2ffcd1df8fdd.tar.gz |
image: peek through a snapshot to the recording surface behind
Fixes record-* after the recent overhaul.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-image-surface.c')
-rw-r--r-- | src/cairo-image-surface.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 7efcc7804..bda05eb9f 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -1406,8 +1406,8 @@ _pixman_image_for_surface (const cairo_surface_pattern_t *pattern, cairo_image_surface_t *source = (cairo_image_surface_t *) pattern->surface; cairo_surface_type_t type; - if (source->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) - source = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) pattern->surface)->target; + if (_cairo_surface_is_snapshot (&source->base)) + source = (cairo_image_surface_t *) _cairo_surface_snapshot_get_target (&source->base); type = source->base.backend->type; if (type == CAIRO_SURFACE_TYPE_IMAGE) { @@ -2963,6 +2963,8 @@ is_recording_pattern (const cairo_pattern_t *pattern) surface = ((const cairo_surface_pattern_t *) pattern)->surface; if (_cairo_surface_is_paginated (surface)) surface = _cairo_paginated_surface_get_recording (surface); + if (_cairo_surface_is_snapshot (surface)) + surface = _cairo_surface_snapshot_get_target (surface); return _cairo_surface_is_recording (surface); } @@ -2974,6 +2976,8 @@ recording_pattern_get_surface (const cairo_pattern_t *pattern) surface = ((const cairo_surface_pattern_t *) pattern)->surface; if (_cairo_surface_is_paginated (surface)) surface = _cairo_paginated_surface_get_recording (surface); + if (_cairo_surface_is_snapshot (surface)) + surface = _cairo_surface_snapshot_get_target (surface); return surface; } |