Commit a5f54e48 authored by Chris Wilson's avatar Chris Wilson 🤔
Browse files

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.
parent 4a678afd
...@@ -156,6 +156,7 @@ _cairo_surface_snapshot_copy_on_write (cairo_surface_t *surface) ...@@ -156,6 +156,7 @@ _cairo_surface_snapshot_copy_on_write (cairo_surface_t *surface)
_cairo_surface_release_source_image (snapshot->target, image, extra); _cairo_surface_release_source_image (snapshot->target, image, extra);
snapshot->target = snapshot->clone; snapshot->target = snapshot->clone;
snapshot->base.type = snapshot->target->type;
} }
/** /**
...@@ -213,6 +214,7 @@ _cairo_surface_snapshot (cairo_surface_t *surface) ...@@ -213,6 +214,7 @@ _cairo_surface_snapshot (cairo_surface_t *surface)
&_cairo_surface_snapshot_backend, &_cairo_surface_snapshot_backend,
NULL, /* device */ NULL, /* device */
surface->content); surface->content);
snapshot->base.type = surface->type;
snapshot->target = surface; snapshot->target = surface;
snapshot->clone = NULL; snapshot->clone = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment