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.
This commit is contained in:
parent
e69cc0f552
commit
7e0beea3f5
|
@ -3158,19 +3158,22 @@ _check_animator_event_catcher_add(void *data, const Efl_Event *event)
|
|||
{
|
||||
if (array[i].desc == EFL_EVENT_ANIMATOR_TICK)
|
||||
{
|
||||
if (ee->anim_count++ > 0) return;
|
||||
INF("Setting up animator for %p from '%s' with title '%s'.", ee->evas, ee->driver, ee->prop.title);
|
||||
if (!ee->anim_count)
|
||||
INF("Setting up animator for %p from '%s' with title '%s'.", ee->evas, ee->driver, ee->prop.title);
|
||||
|
||||
if (ee->engine.func->fn_animator_register &&
|
||||
ee->engine.func->fn_animator_unregister)
|
||||
{
|
||||
// Backend support per window vsync
|
||||
ee->engine.func->fn_animator_register(ee);
|
||||
_ecore_evas_custom_tick_begin(ee);
|
||||
|
||||
if (ee->anim_count > 0) return;
|
||||
if (!_general_tick) _general_tick = ee;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Backend doesn't support per window vsync, fallback to generic support
|
||||
if (ee->anim_count++ > 0) return;
|
||||
ee->anim = ecore_animator_add(_ecore_evas_animator_fallback, ee);
|
||||
}
|
||||
|
||||
|
@ -3192,19 +3195,21 @@ _check_animator_event_catcher_del(void *data, const Efl_Event *event)
|
|||
{
|
||||
if (array[i].desc == EFL_EVENT_ANIMATOR_TICK)
|
||||
{
|
||||
if ((--ee->anim_count) > 0) return;
|
||||
if (ee->anim_count == 1)
|
||||
INF("Unsetting up animator for %p from '%s' titled '%s'.", ee->evas, ee->driver, ee->prop.title);
|
||||
|
||||
INF("Unsetting up animator for %p from '%s' titled '%s'.", ee->evas, ee->driver, ee->prop.title);
|
||||
if (ee->engine.func->fn_animator_register &&
|
||||
ee->engine.func->fn_animator_unregister)
|
||||
{
|
||||
// Backend support per window vsync
|
||||
ee->engine.func->fn_animator_unregister(ee);
|
||||
_ecore_evas_custom_tick_end(ee);
|
||||
if (ee->anim_count > 0) return;
|
||||
if (_general_tick == ee) _ecore_evas_tick_source_find();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Backend doesn't support per window vsync, fallback to generic support
|
||||
if (--ee->anim_count > 0) return;
|
||||
ecore_animator_del(ee->anim);
|
||||
ee->anim = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue