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.
This commit is contained in:
Hermet Park 2019-10-17 17:39:26 +09:00
parent c978a051cc
commit 7e29feaa32
1 changed files with 10 additions and 12 deletions

View File

@ -54,18 +54,6 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
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;
char *key = _get_key_val(node);
Efl_Canvas_Vg_Shape *shape = efl_key_data_get(parent, key);
if (!shape)
@ -76,6 +64,16 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
else
efl_gfx_path_reset(shape);
//Skip Invisible Stroke?
if (node->mStroke.enable && node->mStroke.width == 0)
{
efl_gfx_entity_visible_set(shape, EINA_FALSE);
continue;
}
const float *data = node->mPath.ptPtr;
if (!data) continue;
efl_gfx_entity_visible_set(shape, EINA_TRUE);
#if DEBUG
for (int i = 0; i < depth; i++) printf(" ");