diff --git a/ChangeLog b/ChangeLog index 479d35e12f..27019c6750 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-03-13 Cedric Bail + + * Edje: use Eina_Cow to reduce memory usage. + 2013-03-12 Jiyoun Park (Jypark) * Ecore_x: fix bug not check data value when get deiconify message diff --git a/NEWS b/NEWS index 272e876781..d8785c1656 100644 --- a/NEWS +++ b/NEWS @@ -123,6 +123,7 @@ Improvements: * eina: eina_strlcat now work with a NULL source. * Evas textblock: Added proper size adjustments for "high" shaped texts. * Use the right macro to disable fcntl. + * Edje: use Eina_Cow to reduce memory usage. Fixes: * Fix a memory leak in ecore_con_dns when using ecore_con_server_connect diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index 13a8f242d1..05ca8f8c9f 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -3006,8 +3006,24 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta if (ep->current) { + const Edje_Calc_Params_Map *map; +#ifdef HAVE_EPHYSICS + const Edje_Calc_Params_Physics *physics; +#endif + + map = p1->map; +#ifdef HAVE_EPHYSICS + physics = p1->physics; +#endif + /* FIXME: except for text, we don't need in that case to recalc p1 at all*/ memcpy(p1, ep->current, sizeof (Edje_Calc_Params)); + + p1->map = map; +#ifdef HAVE_EPHYSICS + p1->physics = physics; +#endif + p1->x += ed->x; p1->y += ed->y; EINA_COW_CALC_MAP_BEGIN(p1, p1_write) // FIXME: this will force an allocation on p1