edje: Fix a major issue with recalc loop

With the new Efl.Ui.Clock widget, which implements Datetime,
most parts are relative to each other, and trigger a near-inifinite
recalc of all the parts. Indeed edje was recalculating a part even
if it had already calculated it (flag is set).

This seemingly simple patch fixes Datetime and probably a lot
of other edje widgets.

Fixes T4909

@fix
This commit is contained in:
Jean-Philippe Andre 2017-02-21 17:49:44 +09:00
parent 81fbd54c17
commit 882ad6fbf5
1 changed files with 5 additions and 2 deletions

View File

@ -4244,10 +4244,13 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
return;
}
if ((ep->calculated & FLAG_XY) == FLAG_XY && !state)
EINA_SAFETY_ON_FALSE_RETURN(flags != FLAG_NONE);
if (!state)
{
return;
if ((ep->calculated & FLAG_XY) == FLAG_XY) return;
if ((ep->calculated & flags) == flags) return;
}
if (ep->calculating & flags)
{
#if 1