cogl: Use memory management helpers more

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1496
This commit is contained in:
Jonas Ådahl 2020-10-14 21:15:50 +02:00 committed by Georges Basile Stavracas Neto
parent 29cdc35654
commit 2aea404b14
2 changed files with 4 additions and 8 deletions

View File

@ -887,13 +887,9 @@ _cogl_framebuffer_flush_dependency_journals (CoglFramebuffer *framebuffer)
{ {
CoglFramebufferPrivate *priv = CoglFramebufferPrivate *priv =
cogl_framebuffer_get_instance_private (framebuffer); cogl_framebuffer_get_instance_private (framebuffer);
GList *l;
for (l = priv->deps; l; l = l->next) g_list_foreach (priv->deps, (GFunc) _cogl_framebuffer_flush_journal, NULL);
_cogl_framebuffer_flush_journal (l->data); g_list_free_full (priv->deps, g_object_unref);
for (l = priv->deps; l; l = l->next)
g_object_unref (l->data);
g_list_free (priv->deps);
priv->deps = NULL; priv->deps = NULL;
} }

View File

@ -198,8 +198,8 @@ _cogl_dispatch_onscreen_cb (CoglContext *context)
_cogl_list_insert_list (&queue, &context->onscreen_events_queue); _cogl_list_insert_list (&queue, &context->onscreen_events_queue);
_cogl_list_init (&context->onscreen_events_queue); _cogl_list_init (&context->onscreen_events_queue);
_cogl_closure_disconnect (context->onscreen_dispatch_idle); g_clear_pointer (&context->onscreen_dispatch_idle,
context->onscreen_dispatch_idle = NULL; _cogl_closure_disconnect);
_cogl_list_for_each_safe (event, tmp, &queue, link) _cogl_list_for_each_safe (event, tmp, &queue, link)
{ {