From 66a4c26ecb422210869d1cacd1bb69a0bc14f7ce Mon Sep 17 00:00:00 2001 From: mike_m Date: Tue, 12 Jul 2011 11:56:54 +0000 Subject: [PATCH] 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 --- src/lib/ecore/ecore_main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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--; -- 2.7.4