forked from enlightenment/efl
ecore-evas - fix continual wakeups with unchanged canvases
this fixes a nasty bug where ecore-evas forces mainloop spins all the time due to trying to align rendraws to animator boundaries. this requires an extra evas feature to work that i just put in. @fix
This commit is contained in:
parent
2b3998cced
commit
8296470e36
|
@ -63,6 +63,31 @@ _ecore_evas_animator(void *data EINA_UNUSED)
|
||||||
}
|
}
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_ecore_evas_changes_get(Ecore_Evas *ee)
|
||||||
|
{
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
if (evas_changed_get(ee->evas)) return EINA_TRUE;
|
||||||
|
EINA_LIST_FOREACH(ee->sub_ecore_evas, l, ee)
|
||||||
|
{
|
||||||
|
if (evas_changed_get(ee->evas)) return EINA_TRUE;
|
||||||
|
}
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_ecore_evas_changes_check(void)
|
||||||
|
{
|
||||||
|
Ecore_Evas *ee;
|
||||||
|
|
||||||
|
EINA_INLIST_FOREACH(ecore_evases, ee)
|
||||||
|
{
|
||||||
|
if (_ecore_evas_changes_get(ee)) return EINA_TRUE;
|
||||||
|
}
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
@ -84,10 +109,13 @@ _ecore_evas_idle_enter(void *data EINA_UNUSED)
|
||||||
if ((!ecore_evas_animator_ticked) &&
|
if ((!ecore_evas_animator_ticked) &&
|
||||||
(!ecore_main_loop_animator_ticked_get()))
|
(!ecore_main_loop_animator_ticked_get()))
|
||||||
{
|
{
|
||||||
if (!ecore_evas_animator)
|
if (_ecore_evas_changes_check())
|
||||||
{
|
{
|
||||||
overtick = 1;
|
if (!ecore_evas_animator)
|
||||||
ecore_evas_animator = ecore_animator_add(_ecore_evas_animator, NULL);
|
{
|
||||||
|
overtick = 1;
|
||||||
|
ecore_evas_animator = ecore_animator_add(_ecore_evas_animator, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue