summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-07-11 16:13:46 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-07-13 18:07:42 -0500
commit7e0beea3f599c56dd2a99d4eaec820723cf6bda2 (patch)
tree7413051818ae7e681a6dcd079cf9ca92a3d88949 /src/lib/ecore_evas
parente69cc0f5522c1e5c9071d0394ebd113f96f79117 (diff)
ecore_evas: Refactor event catchers to call custom_tick_begin/end
Make the event catcher functions call the custom_tick_begin/end helpers instead of directly calling the engine functions.
Diffstat (limited to 'src/lib/ecore_evas')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index a9657add9c..ffc4e6f75d 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -3158,19 +3158,22 @@ _check_animator_event_catcher_add(void *data, const Efl_Event *event)
3158 { 3158 {
3159 if (array[i].desc == EFL_EVENT_ANIMATOR_TICK) 3159 if (array[i].desc == EFL_EVENT_ANIMATOR_TICK)
3160 { 3160 {
3161 if (ee->anim_count++ > 0) return; 3161 if (!ee->anim_count)
3162 INF("Setting up animator for %p from '%s' with title '%s'.", ee->evas, ee->driver, ee->prop.title); 3162 INF("Setting up animator for %p from '%s' with title '%s'.", ee->evas, ee->driver, ee->prop.title);
3163 3163
3164 if (ee->engine.func->fn_animator_register && 3164 if (ee->engine.func->fn_animator_register &&
3165 ee->engine.func->fn_animator_unregister) 3165 ee->engine.func->fn_animator_unregister)
3166 { 3166 {
3167 // Backend support per window vsync 3167 // Backend support per window vsync
3168 ee->engine.func->fn_animator_register(ee); 3168 _ecore_evas_custom_tick_begin(ee);
3169
3170 if (ee->anim_count > 0) return;
3169 if (!_general_tick) _general_tick = ee; 3171 if (!_general_tick) _general_tick = ee;
3170 } 3172 }
3171 else 3173 else
3172 { 3174 {
3173 // Backend doesn't support per window vsync, fallback to generic support 3175 // Backend doesn't support per window vsync, fallback to generic support
3176 if (ee->anim_count++ > 0) return;
3174 ee->anim = ecore_animator_add(_ecore_evas_animator_fallback, ee); 3177 ee->anim = ecore_animator_add(_ecore_evas_animator_fallback, ee);
3175 } 3178 }
3176 3179
@@ -3192,19 +3195,21 @@ _check_animator_event_catcher_del(void *data, const Efl_Event *event)
3192 { 3195 {
3193 if (array[i].desc == EFL_EVENT_ANIMATOR_TICK) 3196 if (array[i].desc == EFL_EVENT_ANIMATOR_TICK)
3194 { 3197 {
3195 if ((--ee->anim_count) > 0) return; 3198 if (ee->anim_count == 1)
3199 INF("Unsetting up animator for %p from '%s' titled '%s'.", ee->evas, ee->driver, ee->prop.title);
3196 3200
3197 INF("Unsetting up animator for %p from '%s' titled '%s'.", ee->evas, ee->driver, ee->prop.title);
3198 if (ee->engine.func->fn_animator_register && 3201 if (ee->engine.func->fn_animator_register &&
3199 ee->engine.func->fn_animator_unregister) 3202 ee->engine.func->fn_animator_unregister)
3200 { 3203 {
3201 // Backend support per window vsync 3204 // Backend support per window vsync
3202 ee->engine.func->fn_animator_unregister(ee); 3205 _ecore_evas_custom_tick_end(ee);
3206 if (ee->anim_count > 0) return;
3203 if (_general_tick == ee) _ecore_evas_tick_source_find(); 3207 if (_general_tick == ee) _ecore_evas_tick_source_find();
3204 } 3208 }
3205 else 3209 else
3206 { 3210 {
3207 // Backend doesn't support per window vsync, fallback to generic support 3211 // Backend doesn't support per window vsync, fallback to generic support
3212 if (--ee->anim_count > 0) return;
3208 ecore_animator_del(ee->anim); 3213 ecore_animator_del(ee->anim);
3209 ee->anim = NULL; 3214 ee->anim = NULL;
3210 } 3215 }