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.
devs/lauromoura/property_revamp
Hermet Park 4 years ago
parent 0e675e5cf1
commit f247a55b50
  1. 22
      src/static_libs/vg_common/vg_common_json.c

@ -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(" ");

Loading…
Cancel
Save