summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-11-14 11:53:01 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-11-14 11:53:01 -0800
commit8215d9832c3ae0e2889a528b08f8b462fb90cd69 (patch)
tree5eaff224a34c846b36203bed4777531d485fc868
parent9f5c37cda744328f53b301572d0ea2b3842b2f39 (diff)
ecore: introduce adjusting main loop time on animator.
-rw-r--r--src/lib/ecore_evas/ecore_evas.c8
-rw-r--r--src/lib/ecore_evas/ecore_evas_private.h2
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index d48394e8c5..c92d5cd07e 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2438,7 +2438,7 @@ _ecore_evas_fps_debug_rendertime_add(double t)
2438static Ecore_Evas *_general_tick = NULL; 2438static Ecore_Evas *_general_tick = NULL;
2439 2439
2440EAPI void 2440EAPI void
2441ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport) 2441ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport, double loop_time)
2442{ 2442{
2443 Ecore_Evas *subee; 2443 Ecore_Evas *subee;
2444 Eina_List *l; 2444 Eina_List *l;
@@ -2453,13 +2453,15 @@ ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport)
2453 a.update_area = *viewport; 2453 a.update_area = *viewport;
2454 } 2454 }
2455 2455
2456 ecore_loop_time_set(loop_time);
2457
2456 ee->animator_ran = EINA_TRUE; 2458 ee->animator_ran = EINA_TRUE;
2457 efl_event_callback_legacy_call(ee->evas, EFL_EVENT_ANIMATOR_TICK, &a); 2459 efl_event_callback_legacy_call(ee->evas, EFL_EVENT_ANIMATOR_TICK, &a);
2458 2460
2459 // FIXME: We do not support partial animator in the subcanvas 2461 // FIXME: We do not support partial animator in the subcanvas
2460 EINA_LIST_FOREACH(ee->sub_ecore_evas, l, subee) 2462 EINA_LIST_FOREACH(ee->sub_ecore_evas, l, subee)
2461 { 2463 {
2462 ecore_evas_animator_tick(subee, NULL); 2464 ecore_evas_animator_tick(subee, NULL, loop_time);
2463 } 2465 }
2464 2466
2465 // We are the source of sync for general animator. 2467 // We are the source of sync for general animator.
@@ -2501,7 +2503,7 @@ _ecore_evas_tick_source_find(void)
2501static Eina_Bool 2503static Eina_Bool
2502_ecore_evas_animator_fallback(void *data) 2504_ecore_evas_animator_fallback(void *data)
2503{ 2505{
2504 ecore_evas_animator_tick(data, NULL); 2506 ecore_evas_animator_tick(data, NULL, ecore_loop_time_get());
2505 return EINA_TRUE; 2507 return EINA_TRUE;
2506} 2508}
2507 2509
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index 432152f8a7..e4642c7c2d 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -436,7 +436,7 @@ const Eina_List *_ecore_evas_available_engines_get(void);
436void _ecore_evas_engine_init(void); 436void _ecore_evas_engine_init(void);
437void _ecore_evas_engine_shutdown(void); 437void _ecore_evas_engine_shutdown(void);
438 438
439EAPI void ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport); 439EAPI void ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport, double loop_time);
440 440
441Eina_Module *_ecore_evas_vnc_server_module_load(void); 441Eina_Module *_ecore_evas_vnc_server_module_load(void);
442 442
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index ba97f5de99..79c1c58623 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -627,7 +627,7 @@ _cb_pageflip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int se
627 627
628 if (edata->ticking) 628 if (edata->ticking)
629 { 629 {
630 ecore_evas_animator_tick(ee, NULL); 630 ecore_evas_animator_tick(ee, NULL, ecore_loop_time_get());
631 ecore_drm2_fb_flip(NULL, edata->output); 631 ecore_drm2_fb_flip(NULL, edata->output);
632 } 632 }
633 else if (ret) ecore_drm2_fb_flip(NULL, edata->output); 633 else if (ret) ecore_drm2_fb_flip(NULL, edata->output);