summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-01-26 14:07:29 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-02-01 14:21:27 -0800
commit1387a7c7f2fc18fffe5f65159abe15cd5865bc96 (patch)
tree963a1907a43921d704345d86cdc722a4cde3ab50
parentbf49c5dafdfea9ba8648983228be428765cb2147 (diff)
win: switch to use per canvas animator tick.
-rw-r--r--src/lib/elm_win.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index ad009b064..d3e8d57d7 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -209,10 +209,9 @@ struct _Elm_Win_Data
209 void *trap_data; 209 void *trap_data;
210 210
211 struct 211 struct
212 { 212 {
213 Ecore_Animator *obj; 213 unsigned short wants;
214 unsigned short wants; 214 } animator;
215 } animator;
216 215
217 double aspect; 216 double aspect;
218 int size_base_w, size_base_h; 217 int size_base_w, size_base_h;
@@ -3338,12 +3337,13 @@ _accel_is_gl(void)
3338} 3337}
3339 3338
3340static Eina_Bool 3339static Eina_Bool
3341_animator_tick_cb(void *_obj) 3340_animator_tick_cb(void *_obj, Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
3342{ 3341{
3343 Elm_Win *obj = _obj; 3342 Elm_Win *obj = _obj;
3344 eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_ANIMATOR_TICK, NULL));
3345 3343
3346 return ECORE_CALLBACK_RENEW; 3344 eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_ANIMATOR_TICK, event_info));
3345
3346 return EO_CALLBACK_CONTINUE;
3347} 3347}
3348 3348
3349static Eina_Bool 3349static Eina_Bool
@@ -3360,8 +3360,8 @@ _cb_added(void *_data,
3360 data->animator.wants++; 3360 data->animator.wants++;
3361 if (data->animator.wants == 1) 3361 if (data->animator.wants == 1)
3362 { 3362 {
3363 data->animator.obj = eo_add(ECORE_ANIMATOR_CLASS, obj, 3363 eo_do(evas_object_evas_get(obj),
3364 ecore_animator_constructor(_animator_tick_cb, obj)); 3364 eo_event_callback_add(EVAS_CANVAS_EVENT_ANIMATOR_TICK, _animator_tick_cb, obj));
3365 } 3365 }
3366 } 3366 }
3367 3367
@@ -3382,8 +3382,8 @@ _cb_deled(void *_data,
3382 data->animator.wants--; 3382 data->animator.wants--;
3383 if (data->animator.wants == 0) 3383 if (data->animator.wants == 0)
3384 { 3384 {
3385 eo_del(data->animator.obj); 3385 eo_do(evas_object_evas_get(obj),
3386 data->animator.obj = NULL; 3386 eo_event_callback_del(EVAS_CANVAS_EVENT_ANIMATOR_TICK, _animator_tick_cb, obj));
3387 } 3387 }
3388 } 3388 }
3389 3389