mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 15:48:00 +02:00
Detach snapshots after flushing in cairo_surface_finish()
Flushing a surface can attach snapshots to it, thus we have to detach the snapshots after the flush, to make sure they aren't leaked. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
59ac884c60
commit
7f68461e0b
1 changed files with 2 additions and 1 deletions
|
|
@ -715,12 +715,13 @@ cairo_surface_finish (cairo_surface_t *surface)
|
|||
if (surface->finished)
|
||||
return;
|
||||
|
||||
cairo_surface_flush (surface);
|
||||
|
||||
/* update the snapshots *before* we declare the surface as finished */
|
||||
_cairo_surface_detach_snapshots (surface);
|
||||
if (surface->snapshot_of != NULL)
|
||||
_cairo_surface_detach_snapshot (surface);
|
||||
|
||||
cairo_surface_flush (surface);
|
||||
surface->finished = TRUE;
|
||||
|
||||
/* call finish even if in error mode */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue