summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-12-27 13:50:48 -0800
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-02 12:53:12 +0100
commit4e6fd08306702784e9f8f12f2f278c6567c52dcc (patch)
tree4d17f06a73c1e051b63e3b31e735dca6265fbeae
parent3c54f6458f80e2221962b01f2d4e4067a6978402 (diff)
downloadefl-4e6fd08306702784e9f8f12f2f278c6567c52dcc.tar.gz
evas: don't initialize font multiple time.
After splitting font family and size set operation, expedite lost a 10% speed due to doing a double initialization (Once when the family is set and one when the size is set). This was noticable in a few tight running tests. This patch enforce that no initialization is called until the size and the family are set. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10976
-rw-r--r--src/lib/evas/canvas/evas_object_text.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index 6cacf8e899..e016585591 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -410,6 +410,8 @@ _evas_text_font_reload(Eo *eo_obj, Evas_Text_Data *o)
Eina_Bool source_invisible = EINA_FALSE;
Eina_List *was = NULL;
+ if (o->cur.size == 0 || (!o->cur.font && !o->cur.source)) return ;
+
if (!(obj->layer->evas->is_frozen))
{
pass = evas_event_passes_through(eo_obj, obj);