summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-10-17 17:39:26 +0900
committerHermet Park <hermetpark@gmail.com>2019-10-17 17:54:02 +0900
commitf247a55b5052cb73f365e18f08128b64b2b9d524 (patch)
treedce0b640637339258b72f005ecd21a898ab8b8d8 /src
parent0e675e5cf1c78876e32bb72ef338f9478371e5c3 (diff)
vector json: fix a ordering issue of stroke.
for optimization, we created a shape node in a lazy way, This introduced corrupted layering order issue. We fix it by keeping the object creation order. Layzing creation is just for an ideal case, It doesn't verified the performance.
Diffstat (limited to 'src')
-rw-r--r--src/static_libs/vg_common/vg_common_json.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/static_libs/vg_common/vg_common_json.c b/src/static_libs/vg_common/vg_common_json.c
index 138b85a..2c31d78 100644
--- a/src/static_libs/vg_common/vg_common_json.c
+++ b/src/static_libs/vg_common/vg_common_json.c
@@ -54,18 +54,6 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
54 continue; 54 continue;
55 } 55 }
56 56
57 //Skip Invisible Stroke?
58 if (node->mStroke.enable && node->mStroke.width == 0)
59 {
60 char *key = _get_key_val(node);
61 Efl_Canvas_Vg_Shape *shape = efl_key_data_get(parent, key);
62 if (shape) efl_gfx_entity_visible_set(shape, EINA_FALSE);
63 continue;
64 }
65
66 const float *data = node->mPath.ptPtr;
67 if (!data) continue;
68
69 char *key = _get_key_val(node); 57 char *key = _get_key_val(node);
70 Efl_Canvas_Vg_Shape *shape = efl_key_data_get(parent, key); 58 Efl_Canvas_Vg_Shape *shape = efl_key_data_get(parent, key);
71 if (!shape) 59 if (!shape)
@@ -76,6 +64,16 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
76 else 64 else
77 efl_gfx_path_reset(shape); 65 efl_gfx_path_reset(shape);
78 66
67 //Skip Invisible Stroke?
68 if (node->mStroke.enable && node->mStroke.width == 0)
69 {
70 efl_gfx_entity_visible_set(shape, EINA_FALSE);
71 continue;
72 }
73
74 const float *data = node->mPath.ptPtr;
75 if (!data) continue;
76
79 efl_gfx_entity_visible_set(shape, EINA_TRUE); 77 efl_gfx_entity_visible_set(shape, EINA_TRUE);
80#if DEBUG 78#if DEBUG
81 for (int i = 0; i < depth; i++) printf(" "); 79 for (int i = 0; i < depth; i++) printf(" ");