edje calc no longer performs calculations for group parts of fixed size
authorMike Blumenkrantz <zmike@osg.samsung.com>
Tue, 31 Mar 2015 23:07:46 +0000 (19:07 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Tue, 31 Mar 2015 23:16:54 +0000 (19:16 -0400)
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

src/lib/edje/edje_calc.c

index 5cb8902..c8268e2 100644 (file)
@@ -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