summaryrefslogtreecommitdiff
path: root/cogl
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2020-10-13 09:19:00 +0200
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2020-10-16 16:17:38 +0000
commite7ac3e2715cfa274c2a28554df0ef042bdf87e4b (patch)
tree66d8cb668fc50c9522671cd54e4149418bbc9f90 /cogl
parentaa99e505adf96865fc54c11db643c2924a73835f (diff)
downloadmutter-e7ac3e2715cfa274c2a28554df0ef042bdf87e4b.tar.gz
cogl/framebuffer: Clean up cleanup function
Use cogl_clear_object() and g_clear_pointer() helpers. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1496
Diffstat (limited to 'cogl')
-rw-r--r--cogl/cogl/cogl-framebuffer.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c
index b89f84fa4..0bc734ecb 100644
--- a/cogl/cogl/cogl-framebuffer.c
+++ b/cogl/cogl/cogl-framebuffer.c
@@ -283,15 +283,11 @@ _cogl_framebuffer_free (CoglFramebuffer *framebuffer)
_cogl_fence_cancel_fences_for_framebuffer (framebuffer);
- _cogl_clip_stack_unref (priv->clip_stack);
- cogl_object_unref (priv->modelview_stack);
- priv->modelview_stack = NULL;
-
- cogl_object_unref (priv->projection_stack);
- priv->projection_stack = NULL;
-
- cogl_object_unref (priv->journal);
+ g_clear_pointer (&priv->clip_stack, _cogl_clip_stack_unref);
+ cogl_clear_object (&priv->modelview_stack);
+ cogl_clear_object (&priv->projection_stack);
+ cogl_clear_object (&priv->journal);
ctx->framebuffers = g_list_remove (ctx->framebuffers, framebuffer);