summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_container.c
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-06-11 16:23:28 +0900
committerHermet Park <hermetpark@gmail.com>2018-06-11 17:18:36 +0900
commitca3fb6bf948dbe82aacaac3de786c5272991b0b1 (patch)
tree2497462c7f13f98dbb68b779bf6523660655265a /src/lib/evas/canvas/evas_vg_container.c
parentd1e1adf0bc4fadb401c778f98110c9ee49540a2c (diff)
evas vg: fix broken vg rendering.
This fixes vg to connect node tree properly on copying nodes. Vector rendering was broken when vg cache tries to reconstruct the scene-graph tree on copying from the original cached one. Exactly, nodes lost parents on copying. Here it fixes the lost links of the scene-graph tree. @fix T6993
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_container.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_container.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/lib/evas/canvas/evas_vg_container.c b/src/lib/evas/canvas/evas_vg_container.c
index 7b2a9cb..a1c3261 100644
--- a/src/lib/evas/canvas/evas_vg_container.c
+++ b/src/lib/evas/canvas/evas_vg_container.c
@@ -152,25 +152,30 @@ _efl_canvas_vg_container_efl_gfx_path_interpolate(Eo *obj,
152} 152}
153 153
154EOLIAN static Efl_VG * 154EOLIAN static Efl_VG *
155_efl_canvas_vg_container_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Container_Data *pd) 155_efl_canvas_vg_container_efl_duplicate_duplicate(const Eo *obj,
156 Efl_Canvas_Vg_Container_Data *pd)
156{ 157{
157 Eina_List *l; 158 Eina_List *l;
158 Efl_VG *child; 159 Efl_VG *child;
159 Efl_VG *cn = NULL; 160 Efl_VG *container;
160 161
161 cn = efl_duplicate(efl_super(obj, MY_CLASS)); 162 container = efl_duplicate(efl_super(obj, MY_CLASS));
163 efl_parent_set(container, efl_parent_get(obj));
164
165 //Copy Children
162 EINA_LIST_FOREACH(pd->children, l, child) 166 EINA_LIST_FOREACH(pd->children, l, child)
163 { 167 {
164 // parent_set adds the new node to the list of children of cn 168 Efl_VG *eo = efl_duplicate(child);
165 efl_parent_set(efl_duplicate(child), cn); 169 efl_parent_set(eo, container);
166 } 170 }
167 return cn; 171
172 return container;
168} 173}
169 174
170EAPI Efl_VG* 175EAPI Efl_VG*
171evas_vg_container_add(Efl_VG *parent) 176evas_vg_container_add(Efl_VG *parent)
172{ 177{
173 return efl_add(EFL_CANVAS_VG_CONTAINER_CLASS, parent); 178 return efl_add(MY_CLASS, parent);
174} 179}
175 180
176#include "efl_canvas_vg_container.eo.c" 181#include "efl_canvas_vg_container.eo.c"