[cairo-commit] 2 commits - src/cairo-quartz-surface.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 25 14:34:40 UTC 2022


 src/cairo-quartz-surface.c |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit fafbfcda91aad8fcf197b350f37db2a4b14361f9
Merge: eee2b9ab9 243938c61
Author: Uli Schlachter <psychon at znc.in>
Date:   Mon Apr 25 14:34:38 2022 +0000

    Merge branch 'issue562' into 'master'
    
    [quartz] Destroy local copy of snapshot after attaching it.
    
    Closes #562
    
    See merge request cairo/cairo!316

commit 243938c61a08dac8911153352e55933e0618581e
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Apr 23 16:38:01 2022 -0700

    [quartz] Destroy local copy of snapshot after attaching it.
    
    Because cairo_surface_snapshot_attach refs the snapshot.
    
    Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/562

diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 5681918c4..fa6d9b1c9 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -2609,6 +2609,7 @@ _cairo_quartz_surface_snapshot_get_image (cairo_quartz_surface_t *surface)
 	if (unlikely (!snapshot || cairo_surface_status (snapshot)))
 	    return NULL;
 	_cairo_surface_attach_snapshot (&surface->base, snapshot, NULL);
+	cairo_surface_destroy (snapshot);
     }
 
     return CGImageRetain (((cairo_quartz_snapshot_t*)snapshot)->image);


More information about the cairo-commit mailing list