From: mike_m Date: Tue, 12 Jul 2011 11:56:54 +0000 (+0000) Subject: ecore: Run timers at end of glib loop X-Git-Tag: accepted/2.0/20130306.224007~181^2~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66a4c26ecb422210869d1cacd1bb69a0bc14f7ce;p=profile%2Fivi%2Fecore.git ecore: Run timers at end of glib loop This reduces the time between calculating the scene and rendering it, making scrolling smoother. Signed-off-by: Mike McCormack git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@61284 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 8d9fda8..5cf9f7d 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -491,9 +491,6 @@ _ecore_main_gsource_prepare(GSource *source __UNUSED__, gint *next_time) if (!ecore_idling) { - while (_ecore_timer_call(_ecore_time_loop_time)); - _ecore_timer_cleanup(); - /* when idling, busy loop checking the fds only */ _ecore_idle_enterer_call(); _ecore_throttle(); @@ -622,7 +619,10 @@ static gboolean _ecore_main_gsource_dispatch(GSource *source __UNUSED__, GSourceFunc callback __UNUSED__, gpointer user_data __UNUSED__) { gboolean events_ready, timers_ready, idlers_ready; - double next_time = _ecore_timer_next_get(); + double next_time; + + _ecore_time_loop_time = ecore_time_get(); + next_time = _ecore_timer_next_get(); events_ready = _ecore_event_exist(); timers_ready = _ecore_timers_exists() && (0.0 == next_time); @@ -665,6 +665,9 @@ _ecore_main_gsource_dispatch(GSource *source __UNUSED__, GSourceFunc callback __ while (_ecore_signal_count_get()) _ecore_signal_call(); _ecore_event_call(); _ecore_main_fd_handlers_cleanup(); + + while (_ecore_timer_call(_ecore_time_loop_time)); + _ecore_timer_cleanup(); } in_main_loop--;