[mutter] cogl/framebuffer: Clean up cleanup function
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl/framebuffer: Clean up cleanup function
- Date: Fri, 16 Oct 2020 16:25:59 +0000 (UTC)
commit e7ac3e2715cfa274c2a28554df0ef042bdf87e4b
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Oct 13 09:19:00 2020 +0200
cogl/framebuffer: Clean up cleanup function
Use cogl_clear_object() and g_clear_pointer() helpers.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1496
cogl/cogl/cogl-framebuffer.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c
index b89f84fa47..0bc734ecb2 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]