mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 23:28:07 +02:00
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:
parent
4a678afdf7
commit
a5f54e48e3
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue