From 270c61dbb74f8f6e4f800f78b054a9da8cb84848 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Wed, 5 Jun 2019 16:42:15 +0900 Subject: [PATCH] canvas vg: optmize lottie vector tree. Skip invisible stroke nodes as possible. --- src/static_libs/vg_common/vg_common_json.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/static_libs/vg_common/vg_common_json.c b/src/static_libs/vg_common/vg_common_json.c index c97bfeaa08..3d00bbb842 100644 --- a/src/static_libs/vg_common/vg_common_json.c +++ b/src/static_libs/vg_common/vg_common_json.c @@ -42,6 +42,15 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l LOTNode *node = layer->mNodeList.ptr[i]; if (!node) continue; + //Skip Invisible Stroke? + if (node->mStroke.enable && node->mStroke.width == 0) + { + char *key = _get_key_val(node); + Efl_Canvas_Vg_Shape *shape = efl_key_data_get(parent, key); + if (shape) efl_gfx_entity_visible_set(shape, EINA_FALSE); + continue; + } + const float *data = node->mPath.ptPtr; if (!data) continue;