forked from enlightenment/efl
ecore_evas - fix aninmator based frame render ticking to full framerate
so i was seeing ecore evas only rendering every 2nd frame... this is because it was adding and deleting animatiors every time it rendered instead of keeping one around as lon as updates where there to render and then remove it afterwards. this caused nasty timing problems and thus problems assessing framerate of rendered content etc. etc. ... not good. this fixes that. this only happened if you only used pure legacy ecore animators. if you used the efl animator tick events it worked right. @fix
This commit is contained in:
parent
fe49d57bfe
commit
09f648ed81
|
@ -120,9 +120,6 @@ _ecore_evas_animator(void *data, const Efl_Event *ev EINA_UNUSED)
|
|||
Ecore_Evas *ee = data;
|
||||
|
||||
ee->animator_ticked = EINA_TRUE;
|
||||
|
||||
efl_event_callback_del(ee->evas, EFL_EVENT_ANIMATOR_TICK, _ecore_evas_animator, ee);
|
||||
ee->animator_registered = EINA_FALSE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -308,6 +305,11 @@ _ecore_evas_idle_enter(void *data EINA_UNUSED)
|
|||
if (ee->engine.func->fn_evas_changed)
|
||||
ee->engine.func->fn_evas_changed(ee, change);
|
||||
|
||||
if (!change)
|
||||
{
|
||||
efl_event_callback_del(ee->evas, EFL_EVENT_ANIMATOR_TICK, _ecore_evas_animator, ee);
|
||||
ee->animator_registered = EINA_FALSE;
|
||||
}
|
||||
#ifdef ECORE_EVAS_ASYNC_RENDER_DEBUG
|
||||
if ((ee->in_async_render) && (ee->async_render_start <= 0.0))
|
||||
{
|
||||
|
@ -3284,8 +3286,11 @@ _ticking_start(Ecore_Evas *ee)
|
|||
{
|
||||
// Backend doesn't support per window vsync, fallback to generic support
|
||||
if (ee->animator_count++ > 0) return;
|
||||
if (!ee->anim)
|
||||
{
|
||||
ee->anim = ecore_animator_add(_ecore_evas_animator_fallback, ee);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -3304,9 +3309,12 @@ _ticking_stop(Ecore_Evas *ee)
|
|||
{
|
||||
// Backend doesn't support per window vsync, fallback to generic support
|
||||
if (--ee->animator_count > 0) return;
|
||||
if (ee->anim)
|
||||
{
|
||||
ecore_animator_del(ee->anim);
|
||||
ee->anim = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue