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.
This commit is contained in:
Chris Wilson 2010-04-27 21:05:22 +01:00
parent 4a678afdf7
commit a5f54e48e3

View file

@ -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;