edje: Add 4000x4000 size limit with reduced loop count restriction 30/79030/2
authorYoungbok Shin <youngb.shin@samsung.com>
Fri, 8 Jul 2016 00:52:07 +0000 (09:52 +0900)
committerYoungbok Shin <youngb.shin@samsung.com>
Sat, 9 Jul 2016 03:47:07 +0000 (12:47 +0900)
The calc loop restriction [255] can cause error from
evas_object_smart_need_recalculate_set() function.
It also has [255] restriction for recalculate cycle.
So, we need to reduce calc loop restriction for
reducing *_need_recalculate_set() function call.

@tizen_fix

Change-Id: I44537a1e9ddd0941499ece90b4646a733fdd6e9e

src/lib/edje/edje_util.c

index e206b4ad4932905954b2ab86fa9bd183593937c7..076b473e98bcd5e2120081f0e5bfaf5141ce80b2 100644 (file)
@@ -3338,7 +3338,17 @@ _edje_object_parts_extends_calc(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *x, Ev
 EOLIAN void
 _edje_object_size_min_restricted_calc(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh)
 {
+   /* TIZEN_ONLY(20160708): Add 4000x4000 size limit with reduced loop count restriction
+      The calc loop restriction [255] can cause error from
+      evas_object_smart_need_recalculate_set() function.
+      It also has [255] restriction for recalculate cycle.
+      So, we need to reduce calc loop restriction for
+      reducing *_need_recalculate_set() function call.
    const int CALC_COUNT_LIMIT = 255;
+    */
+   const int CALC_COUNT_LIMIT = 32;
+   const int MIN_LIMIT = 4000;
+   /* END */
 
    Evas_Coord orig_w, orig_h; //original edje size
    int max_over_w, max_over_h;  //maximum over-calculated size.
@@ -3464,7 +3474,12 @@ again:
              if (ed->h < restrictedh) ed->h = restrictedh;
           }
 
+        /* TIZEN_ONLY(20160708): Add 4000x4000 size limit with reduced loop count restriction
         if (reset_max && (calc_count > CALC_COUNT_LIMIT))
+         */
+        if (reset_max && (calc_count > CALC_COUNT_LIMIT) &&
+            ((ed->w > MIN_LIMIT) || (ed->h > MIN_LIMIT)))
+        /* END */
           {
              /* Only print it if we have a non-fixed textblock.
               * We should possibly avoid all of this if in this case, but in