devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7bbf18a950c027a365fea1b88e8dc3f16bb81abe
commit 7bbf18a950c027a365fea1b88e8dc3f16bb81abe Author: Mike Blumenkrantz <[email protected]> Date: Mon Jun 25 15:19:33 2018 -0400 edje: return available text data in part_text_get without recalc when possible Summary: based on the codepaths taken when setting text to a part, a recalc should only be necessary when returning markup from a textblock, and this is only the case because the function returns a non-allocated string in the case where the object is textblock and (legacy || not fetching markup), the current text is guaranteed to be set on this pointer. the reason a recalc is necessary for the markup case is because edje TEXTBLOCK parts only set text to the internal textblock during a recalc, meaning that attempting to fetch text on a just-set part will fail; this does not mean that the internal textblock object doesn't exist, only that the text has not yet been set to it Depends on D6422 Reviewers: herdsman, devilhorns Reviewed By: devilhorns Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6423 --- src/lib/edje/edje_util.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 7ab54bb4bd..a4d7276f1d 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -2080,18 +2080,22 @@ _edje_efl_text_text_get(const Eo *obj EINA_UNUSED, Edje *ed, const char *part, { const char *entry; if (legacy) - { - entry = evas_object_textblock_text_markup_get(rp->object); - } + entry = rp->typedata.text->text; else { if (get_markup) { +#ifdef EDJE_CALC_CACHE + if (rp->invalidate) +#else + if (ed->dirty) +#endif + _edje_recalc_do(ed); entry = efl_text_markup_get(rp->object); } else { - entry = efl_text_get(rp->object); + entry = rp->typedata.text->text; } } --
