From: ali-alzyod Date: Thu, 19 Nov 2020 08:29:48 +0000 (+0200) Subject: evas_textblock: reduce content fit calculations X-Git-Tag: accepted/tizen/unified/20201124.123027~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F22%2F248022%2F1;p=platform%2Fupstream%2Fefl.git evas_textblock: reduce content fit calculations Reviewers: woohyun, id213sin Reviewed By: woohyun, id213sin Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12187 Change-Id: I053bf185a07f5b698b14636ec07e771e6f94990f --- diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 968378d..63e692c 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -18473,6 +18473,10 @@ int fit_text_block(Evas_Object *eo_obj) TEXT_FIT_CONTENT_CONFIG * fc = &o->fit_content_config; + // If there are no text or Paragraphs, then do nothing + if (efl_canvas_textblock_is_empty_get(eo_obj)) + return EVAS_ERROR_SUCCESS; + if (fc->options == TEXTBLOCK_FIT_MODE_NONE && !fc->force_refit) return EVAS_ERROR_SUCCESS;