From c5e659d5922b406059c94545c1a5c773f61b2379 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 29 May 2009 14:52:49 +0100 Subject: [PATCH] [master clock] Use StageManager::peek_stages() Use the new StageManager::peek_stages() method to avoid a copy of the stages list. --- clutter/clutter-master-clock.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/clutter/clutter-master-clock.c b/clutter/clutter-master-clock.c index 430edd3aa..ea3440555 100644 --- a/clutter/clutter-master-clock.c +++ b/clutter/clutter-master-clock.c @@ -204,12 +204,11 @@ clutter_clock_dispatch (GSource *source, ClutterClockSource *clock_source = (ClutterClockSource *) source; ClutterMasterClock *master_clock = clock_source->master_clock; ClutterStageManager *stage_manager = clutter_stage_manager_get_default (); - GSList *stages, *l; + const GSList *stages, *l; CLUTTER_NOTE (SCHEDULER, "Master clock [tick]"); - /* FIXME - we need peek_stages() to avoid the copy */ - stages = clutter_stage_manager_list_stages (stage_manager); + stages = clutter_stage_manager_peek_stages (stage_manager); /* queue a redraw for each stage; this will advance each timeline * held by the master clock of the amount of milliseconds elapsed @@ -218,8 +217,6 @@ clutter_clock_dispatch (GSource *source, for (l = stages; l != NULL; l = l->next) clutter_actor_queue_redraw (l->data); - g_slist_free (stages); - /* if this is the remainder of an advancement, needed for the last * timeline to finish its run, then we need to reset the prev_tick */