aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-03-31 19:07:46 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-03-31 19:16:54 -0400
commit3a451650d2f875077419e5777c49d04c618211f0 (patch)
tree680004408b798eb6bf0f775041e065512b9876bc
parentedje: add edje_file_iterator_new(). (diff)
downloadefl-3a451650d2f875077419e5777c49d04c618211f0.tar.gz
edje calc no longer performs calculations for group parts of fixed size
if the min/max of a part are identical and > 0, the part's min size is guaranteed to be this size. there is no need to perform expensive recursive calcs here
-rw-r--r--src/lib/edje/edje_calc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 5cb890260f..c8268e2ea9 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -3225,8 +3225,18 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
(ep->typedata.swallow)) &&
ep->typedata.swallow->swallowed_object)
{
- edje_object_size_min_calc(ep->typedata.swallow->swallowed_object,
- &mmw, &mmh);
+ Edje_Size *min = NULL, *max = NULL;
+
+ if (ep->chosen_description)
+ {
+ min = &ep->chosen_description->min;
+ max = &ep->chosen_description->max;
+ }
+ if (min && max && (min->w == max->w) && (min->h == max->h))
+ mmw = min->w, mmh = min->h;
+ else
+ edje_object_size_min_calc(ep->typedata.swallow->swallowed_object,
+ &mmw, &mmh);
}
#ifdef EDJE_CALC_CACHE