From ddeb9252c23537c7f4920da3a11c615b58c86df0 Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Fri, 9 Feb 2018 12:41:04 +0900 Subject: [PATCH] edje: don't calculate textblock twice It will trigger additional size calculation only for fit option. The fit option can be calculated at once. It is a hack. @tizen_fix Change-Id: I9b115ebd71bc5cb0f4ebebe96f061052fb2d8293 --- src/lib/edje/edje_calc.c | 3 +++ src/lib/edje/edje_private.h | 3 +++ src/lib/edje/edje_textblock.c | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index 82e66e9..df6d29f 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -5043,7 +5043,10 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta break; case EDJE_PART_TYPE_TEXTBLOCK: + /* TIZEN_ONLY(20180205): don't calculate textblock twice _edje_textblock_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text *)chosen_desc); + */ + /* END */ break; case EDJE_PART_TYPE_VECTOR: diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index e521b71..c867003 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -2691,10 +2691,13 @@ _edje_part_recalc_single_textblock(FLOAT_T sc, Edje_Calc_Params *params, int *minw, int *minh, int *maxw, int *maxh); +/* TIZEN_ONLY(20180205): don't calculate textblock twice void _edje_textblock_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *params, Edje_Part_Description_Text *chosen_desc); + */ +/* END */ Edje_Real_Part *_edje_real_part_get(const Edje *ed, const char *part); diff --git a/src/lib/edje/edje_textblock.c b/src/lib/edje/edje_textblock.c index 363ae04..4312843 100644 --- a/src/lib/edje/edje_textblock.c +++ b/src/lib/edje/edje_textblock.c @@ -806,12 +806,13 @@ _edje_part_recalc_single_textblock(FLOAT_T sc, } } +/* TIZEN_ONLY(20180205): don't calculate textblock twice void _edje_textblock_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *params, Edje_Part_Description_Text *chosen_desc) { - /* FIXME: this is just an hack. */ + // FIXME: this is just an hack. FLOAT_T sc; #if 0 @@ -826,3 +827,5 @@ _edje_textblock_recalc_apply(Edje *ed, Edje_Real_Part *ep, NULL, NULL, NULL, NULL); } } + */ +/* END */ -- 2.7.4