summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2016-03-22 12:21:29 +0830
committerJi-Youn Park <jy0703.park@samsung.com>2016-03-22 12:23:37 +0830
commitf9e655046868cb83cbc9ac2dcd139e3540e89285 (patch)
tree28d33fc5f81da3163c825171c36f9db9a7f2e134 /src
parente8bbb29499c586c5511e9b3139ceb506e7f9bf9f (diff)
ecore_evas: change RENDER_SYNC from define to env
outside needs to turn on/off RENDER_SYNC feature. env val: ECORE_EVAS_RENDER_SYNC.
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index eb57467..2ab7371 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -48,9 +48,8 @@ static Ecore_Idle_Enterer *ecore_evas_idle_enterer = NULL;
48static Ecore_Evas *ecore_evases = NULL; 48static Ecore_Evas *ecore_evases = NULL;
49static int _ecore_evas_fps_debug = 0; 49static int _ecore_evas_fps_debug = 0;
50 50
51#define RENDER_SYNC 1 51//RENDER_SYNC
52 52static int _ecore_evas_render_sync = 0;
53#ifdef RENDER_SYNC
54static Ecore_Animator *ecore_evas_animator = NULL; 53static Ecore_Animator *ecore_evas_animator = NULL;
55static Eina_Bool ecore_evas_animator_ticked = EINA_FALSE; 54static Eina_Bool ecore_evas_animator_ticked = EINA_FALSE;
56static Eina_Bool ecore_evas_first = EINA_TRUE; 55static Eina_Bool ecore_evas_first = EINA_TRUE;
@@ -93,7 +92,6 @@ _ecore_evas_changes_check(void)
93 } 92 }
94 return EINA_FALSE; 93 return EINA_FALSE;
95} 94}
96#endif
97 95
98static Eina_Bool 96static Eina_Bool
99_ecore_evas_idle_enter(void *data EINA_UNUSED) 97_ecore_evas_idle_enter(void *data EINA_UNUSED)
@@ -108,26 +106,27 @@ _ecore_evas_idle_enter(void *data EINA_UNUSED)
108 106
109 if (!ecore_evases) return ECORE_CALLBACK_RENEW; 107 if (!ecore_evases) return ECORE_CALLBACK_RENEW;
110 108
111#ifdef RENDER_SYNC 109 if (_ecore_evas_render_sync)
112 if (!ecore_evas_first)
113 { 110 {
114 if ((!ecore_evas_animator_ticked) && 111 if (!ecore_evas_first)
115 (!ecore_main_loop_animator_ticked_get()))
116 { 112 {
117 if (_ecore_evas_changes_check()) 113 if ((!ecore_evas_animator_ticked) &&
114 (!ecore_main_loop_animator_ticked_get()))
118 { 115 {
119 if (!ecore_evas_animator) 116 if (_ecore_evas_changes_check())
120 { 117 {
121 overtick = 1; 118 if (!ecore_evas_animator)
122 ecore_evas_animator = ecore_animator_add(_ecore_evas_animator, NULL); 119 {
120 overtick = 1;
121 ecore_evas_animator = ecore_animator_add(_ecore_evas_animator, NULL);
122 }
123 } 123 }
124 return ECORE_CALLBACK_RENEW;
124 } 125 }
125 return ECORE_CALLBACK_RENEW; 126 ecore_evas_animator_ticked = EINA_FALSE;
126 } 127 }
127 ecore_evas_animator_ticked = EINA_FALSE; 128 ecore_evas_first = EINA_FALSE;
128 } 129 }
129 ecore_evas_first = EINA_FALSE;
130#endif
131 130
132 if (_ecore_evas_fps_debug) 131 if (_ecore_evas_fps_debug)
133 { 132 {
@@ -392,6 +391,7 @@ ecore_evas_init(void)
392 ecore_evas_idle_enterer = 391 ecore_evas_idle_enterer =
393 ecore_idle_enterer_add(_ecore_evas_idle_enter, NULL); 392 ecore_idle_enterer_add(_ecore_evas_idle_enter, NULL);
394 if (getenv("ECORE_EVAS_FPS_DEBUG")) _ecore_evas_fps_debug = 1; 393 if (getenv("ECORE_EVAS_FPS_DEBUG")) _ecore_evas_fps_debug = 1;
394 if (getenv("ECORE_EVAS_RENDER_SYNC")) _ecore_evas_render_sync = 1;
395 if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init(); 395 if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init();
396 396
397#ifdef BUILD_ECORE_EVAS_EWS 397#ifdef BUILD_ECORE_EVAS_EWS
@@ -435,10 +435,12 @@ ecore_evas_shutdown(void)
435 if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_shutdown(); 435 if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_shutdown();
436 ecore_idle_enterer_del(ecore_evas_idle_enterer); 436 ecore_idle_enterer_del(ecore_evas_idle_enterer);
437 ecore_evas_idle_enterer = NULL; 437 ecore_evas_idle_enterer = NULL;
438#ifdef RENDER_SYNC 438
439 if (ecore_evas_animator) ecore_animator_del(ecore_evas_animator); 439 if (_ecore_evas_render_sync)
440 ecore_evas_animator = NULL; 440 {
441#endif 441 if (ecore_evas_animator) ecore_animator_del(ecore_evas_animator);
442 ecore_evas_animator = NULL;
443 }
442 444
443 _ecore_evas_extn_shutdown(); 445 _ecore_evas_extn_shutdown();
444 446
@@ -3221,9 +3223,7 @@ _ecore_evas_register(Ecore_Evas *ee)
3221 3223
3222 eo_event_callback_array_add(ee->evas, animator_watch(), ee); 3224 eo_event_callback_array_add(ee->evas, animator_watch(), ee);
3223 3225
3224#ifdef RENDER_SYNC 3226 if (_ecore_evas_render_sync) ecore_evas_first = EINA_TRUE;
3225 ecore_evas_first = EINA_TRUE;
3226#endif
3227} 3227}
3228 3228
3229EAPI void 3229EAPI void