diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-04-27 21:05:22 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-04-28 08:39:21 +0100 |
commit | a5f54e48e3136076f3c8c60fc068f6a2105d9a33 (patch) | |
tree | c9186c221cf807c42937b7732f3ca7b2fde55370 /src/cairo-surface-snapshot.c | |
parent | 4a678afdf73d6f7b2b8a532ac7024976702c8aac (diff) | |
download | cairo-a5f54e48e3136076f3c8c60fc068f6a2105d9a33.tar.gz |
snapshot: The snapshot masquerades as the target surface type.
Not wholly convinced this is a good idea, but it matches the behaviour
of the other internal surface types.
Diffstat (limited to 'src/cairo-surface-snapshot.c')
-rw-r--r-- | src/cairo-surface-snapshot.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cairo-surface-snapshot.c b/src/cairo-surface-snapshot.c index 5e1ec749f..4ad16aa3f 100644 --- a/src/cairo-surface-snapshot.c +++ b/src/cairo-surface-snapshot.c @@ -156,6 +156,7 @@ _cairo_surface_snapshot_copy_on_write (cairo_surface_t *surface) _cairo_surface_release_source_image (snapshot->target, image, extra); snapshot->target = snapshot->clone; + snapshot->base.type = snapshot->target->type; } /** @@ -213,6 +214,7 @@ _cairo_surface_snapshot (cairo_surface_t *surface) &_cairo_surface_snapshot_backend, NULL, /* device */ surface->content); + snapshot->base.type = surface->type; snapshot->target = surface; snapshot->clone = NULL; |