summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore/ecore_main.c
diff options
context:
space:
mode:
authorMike McCormack <mj.mccormack@samsung.com>2011-07-27 03:13:47 +0000
committerMike McCormack <mikem@ring3k.org>2011-07-27 03:13:47 +0000
commit6f8f583abfdec3a2c46ec5fb9b17d5866c280d27 (patch)
treed6f10331a6ca45cca661b2396cadce562b33095c /legacy/ecore/src/lib/ecore/ecore_main.c
parent1fe297b463d8d33def81cb608c452b4f038deb12 (diff)
ecore: Reduce rendering latency in g_main_loop
After a lot of hair pulling, and other debugging, it appears that to make animation smooth on an embedded device, the following things should happen in (quick) sequence: 1. update the loop time 2. call timers (which animates and updates the scene graph) 3. call idle enterers (which renders to the display) 4. call fd buf handlers (which flushes xlib stuff) Signed-off-by: Mike McCormack <mj.mccormack@samsung.com> SVN revision: 61784
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/legacy/ecore/src/lib/ecore/ecore_main.c b/legacy/ecore/src/lib/ecore/ecore_main.c
index 41422a584d..53d7a8aa32 100644
--- a/legacy/ecore/src/lib/ecore/ecore_main.c
+++ b/legacy/ecore/src/lib/ecore/ecore_main.c
@@ -492,12 +492,16 @@ _ecore_main_gsource_prepare(GSource *source __UNUSED__, gint *next_time)
492 492
493 if (!ecore_idling && !_ecore_glib_idle_enterer_called) 493 if (!ecore_idling && !_ecore_glib_idle_enterer_called)
494 { 494 {
495 _ecore_time_loop_time = ecore_time_get();
495 while (_ecore_timer_call(_ecore_time_loop_time)); 496 while (_ecore_timer_call(_ecore_time_loop_time));
496 _ecore_timer_cleanup(); 497 _ecore_timer_cleanup();
497 498
498 _ecore_idle_enterer_call(); 499 _ecore_idle_enterer_call();
499 _ecore_throttle(); 500 _ecore_throttle();
500 _ecore_glib_idle_enterer_called = FALSE; 501 _ecore_glib_idle_enterer_called = FALSE;
502
503 if (fd_handlers_with_buffer)
504 _ecore_main_fd_handlers_buf_call();
501 } 505 }
502 506
503 while (_ecore_signal_count_get()) _ecore_signal_call(); 507 while (_ecore_signal_count_get()) _ecore_signal_call();
@@ -607,7 +611,6 @@ _ecore_main_gsource_check(GSource *source __UNUSED__)
607 ret = TRUE; 611 ret = TRUE;
608 612
609 /* check timers after updating loop time */ 613 /* check timers after updating loop time */
610 _ecore_time_loop_time = ecore_time_get();
611 if (!ret && _ecore_timers_exists()) 614 if (!ret && _ecore_timers_exists())
612 ret = (0.0 == _ecore_timer_next_get()); 615 ret = (0.0 == _ecore_timer_next_get());
613 616
@@ -675,6 +678,9 @@ _ecore_main_gsource_dispatch(GSource *source __UNUSED__, GSourceFunc callback __
675 _ecore_idle_enterer_call(); 678 _ecore_idle_enterer_call();
676 _ecore_throttle(); 679 _ecore_throttle();
677 _ecore_glib_idle_enterer_called = TRUE; 680 _ecore_glib_idle_enterer_called = TRUE;
681
682 if (fd_handlers_with_buffer)
683 _ecore_main_fd_handlers_buf_call();
678 } 684 }
679 685
680 in_main_loop--; 686 in_main_loop--;