summaryrefslogtreecommitdiff
path: root/src/lib/evas/vg
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/vg
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/vg')
-rw-r--r--src/lib/evas/vg/evas_vg_cache.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/evas/vg/evas_vg_cache.c b/src/lib/evas/vg/evas_vg_cache.c
index eca5cca163..9bbf4d94be 100644
--- a/src/lib/evas/vg/evas_vg_cache.c
+++ b/src/lib/evas/vg/evas_vg_cache.c
@@ -177,7 +177,6 @@ static void
177_evas_cache_vg_data_free_cb(void *data) 177_evas_cache_vg_data_free_cb(void *data)
178{ 178{
179 Vg_File_Data *val = data; 179 Vg_File_Data *val = data;
180
181 efl_del(val->root); 180 efl_del(val->root);
182 free(val); 181 free(val);
183} 182}
@@ -268,11 +267,10 @@ _apply_transformation(Efl_VG *root, double w, double h, Vg_File_Data *vg_data)
268static Efl_VG * 267static Efl_VG *
269_evas_vg_dup_vg_tree(Vg_File_Data *fd, double w, double h) 268_evas_vg_dup_vg_tree(Vg_File_Data *fd, double w, double h)
270{ 269{
271
272 Efl_VG *root; 270 Efl_VG *root;
273 271
274 if (!fd) return NULL; 272 if (!fd) return NULL;
275 if ( !w || !h ) return NULL; 273 if (w < 1 || h < 1) return NULL;
276 274
277 root = efl_duplicate(fd->root); 275 root = efl_duplicate(fd->root);
278 _apply_transformation(root, w, h, fd); 276 _apply_transformation(root, w, h, fd);
@@ -335,9 +333,8 @@ evas_cache_vg_tree_get(Evas_Cache_Vg_Entry *entry)
335 if (entry->root) return entry->root; 333 if (entry->root) return entry->root;
336 334
337 if (entry->file) 335 if (entry->file)
338 { 336 _evas_cache_svg_vg_tree_update(entry);
339 _evas_cache_svg_vg_tree_update(entry); 337
340 }
341 return entry->root; 338 return entry->root;
342} 339}
343 340