summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore/ecore_main.c
diff options
context:
space:
mode:
authorMike McCormack <mj.mccormack@samsung.com>2011-07-12 11:56:54 +0000
committerMike McCormack <mikem@ring3k.org>2011-07-12 11:56:54 +0000
commitdc537d00479292bb3f7c2827be7421b104d55c4b (patch)
tree0d8774c7f27d20c739f8b0094a06aba3407e9df9 /legacy/ecore/src/lib/ecore/ecore_main.c
parent540bf3368f2bd0ac9d12700a8633cb1d53f7e79c (diff)
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 <mj.mccormack@samsung.com> SVN revision: 61284
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_main.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/legacy/ecore/src/lib/ecore/ecore_main.c b/legacy/ecore/src/lib/ecore/ecore_main.c
index 8d9fda88d1..5cf9f7d2d4 100644
--- a/legacy/ecore/src/lib/ecore/ecore_main.c
+++ b/legacy/ecore/src/lib/ecore/ecore_main.c
@@ -491,9 +491,6 @@ _ecore_main_gsource_prepare(GSource *source __UNUSED__, gint *next_time)
491 491
492 if (!ecore_idling) 492 if (!ecore_idling)
493 { 493 {
494 while (_ecore_timer_call(_ecore_time_loop_time));
495 _ecore_timer_cleanup();
496
497 /* when idling, busy loop checking the fds only */ 494 /* when idling, busy loop checking the fds only */
498 _ecore_idle_enterer_call(); 495 _ecore_idle_enterer_call();
499 _ecore_throttle(); 496 _ecore_throttle();
@@ -622,7 +619,10 @@ static gboolean
622_ecore_main_gsource_dispatch(GSource *source __UNUSED__, GSourceFunc callback __UNUSED__, gpointer user_data __UNUSED__) 619_ecore_main_gsource_dispatch(GSource *source __UNUSED__, GSourceFunc callback __UNUSED__, gpointer user_data __UNUSED__)
623{ 620{
624 gboolean events_ready, timers_ready, idlers_ready; 621 gboolean events_ready, timers_ready, idlers_ready;
625 double next_time = _ecore_timer_next_get(); 622 double next_time;
623
624 _ecore_time_loop_time = ecore_time_get();
625 next_time = _ecore_timer_next_get();
626 626
627 events_ready = _ecore_event_exist(); 627 events_ready = _ecore_event_exist();
628 timers_ready = _ecore_timers_exists() && (0.0 == next_time); 628 timers_ready = _ecore_timers_exists() && (0.0 == next_time);
@@ -665,6 +665,9 @@ _ecore_main_gsource_dispatch(GSource *source __UNUSED__, GSourceFunc callback __
665 while (_ecore_signal_count_get()) _ecore_signal_call(); 665 while (_ecore_signal_count_get()) _ecore_signal_call();
666 _ecore_event_call(); 666 _ecore_event_call();
667 _ecore_main_fd_handlers_cleanup(); 667 _ecore_main_fd_handlers_cleanup();
668
669 while (_ecore_timer_call(_ecore_time_loop_time));
670 _ecore_timer_cleanup();
668 } 671 }
669 672
670 in_main_loop--; 673 in_main_loop--;