edje/style: Avoid unnecessary evas_textblock_style computation.

Summary:
If the style is not readonly we always compute the style again when
requested by edje. so this computation is unnecessary.
By avoiding the computation here we will avoid style computation of all the styles in the edje
that is not readonly hence saving memory.

Reviewers: ali.alzyod, Hermet, cedric, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9693
This commit is contained in:
subhransu mohanty 2019-08-22 10:53:36 +09:00 committed by Hermet Park
parent be6555e754
commit 7c08d7b97c
1 changed files with 3 additions and 2 deletions

View File

@ -440,8 +440,9 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
if (tag->text_class) stl->readonly = EINA_FALSE;
}
/* Configure the style */
evas_textblock_style_set(stl->style, eina_strbuf_string_get(styleBuffer));
/* Configure the style only if it will never change again*/
if (stl->readonly)
evas_textblock_style_set(stl->style, eina_strbuf_string_get(styleBuffer));
}
if (fontsource) free(fontsource);