summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/efl_canvas_vg.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg.c b/src/lib/evas/canvas/efl_canvas_vg.c
index 15d0eb21b9..a869308651 100644
--- a/src/lib/evas/canvas/efl_canvas_vg.c
+++ b/src/lib/evas/canvas/efl_canvas_vg.c
@@ -244,22 +244,18 @@ _efl_canvas_vg_viewbox_align_get(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd, do
244EOLIAN static Eina_Bool 244EOLIAN static Eina_Bool
245_efl_canvas_vg_efl_file_file_set(Eo *obj, Efl_Canvas_Vg_Data *pd, const char *file, const char *key) 245_efl_canvas_vg_efl_file_file_set(Eo *obj, Efl_Canvas_Vg_Data *pd, const char *file, const char *key)
246{ 246{
247 Evas_Cache_Vg_Entry *old_entry;
247 int w, h; 248 int w, h;
248 Evas_Cache_Vg_Entry *entry;
249 249
250 if (!file) return EINA_FALSE; 250 if (!file) return EINA_FALSE;
251 251
252 old_entry = pd->vg_entry;
252 evas_object_geometry_get(obj, NULL, NULL, &w, &h); 253 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
253 entry = evas_cache_vg_entry_find(file, key, w, h); 254 pd->vg_entry = evas_cache_vg_entry_find(file, key, w, h);
254 if (entry != pd->vg_entry) 255 if (pd->vg_entry != old_entry)
255 { 256 evas_object_change(obj, efl_data_scope_get(obj, EFL_CANVAS_OBJECT_CLASS));
256 if (pd->vg_entry) 257 evas_cache_vg_entry_del(old_entry);
257 { 258
258 evas_cache_vg_entry_del(pd->vg_entry);
259 }
260 pd->vg_entry = entry;
261 }
262 evas_object_change(obj, efl_data_scope_get(obj, EFL_CANVAS_OBJECT_CLASS));
263 return EINA_TRUE; 259 return EINA_TRUE;
264} 260}
265 261
@@ -276,7 +272,7 @@ _efl_canvas_vg_efl_file_file_get(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd, co
276EOLIAN static Eina_Bool 272EOLIAN static Eina_Bool
277_efl_canvas_vg_efl_file_save(const Eo *obj, Efl_Canvas_Vg_Data *pd, const char *file, const char *key, const char *flags) 273_efl_canvas_vg_efl_file_save(const Eo *obj, Efl_Canvas_Vg_Data *pd, const char *file, const char *key, const char *flags)
278{ 274{
279 Vg_File_Data tmp; 275 Vg_File_Data tmp = {};
280 Vg_File_Data *info = &tmp; 276 Vg_File_Data *info = &tmp;
281 277
282 if (pd->vg_entry && pd->vg_entry->file) 278 if (pd->vg_entry && pd->vg_entry->file)
@@ -291,8 +287,7 @@ _efl_canvas_vg_efl_file_save(const Eo *obj, Efl_Canvas_Vg_Data *pd, const char *
291 info->root = pd->root; 287 info->root = pd->root;
292 info->preserve_aspect = EINA_FALSE; 288 info->preserve_aspect = EINA_FALSE;
293 } 289 }
294 evas_vg_save_to_file(info, file, key, flags); 290 return evas_vg_save_to_file(info, file, key, flags);
295 return EINA_TRUE;
296} 291}
297 292
298static void 293static void
@@ -431,7 +426,6 @@ _efl_canvas_vg_render(Evas_Object *eo_obj EINA_UNUSED,
431 { 426 {
432 root = vd->root; 427 root = vd->root;
433 } 428 }
434 //obj->layer->evas->engine.func->ector_begin(output, context,
435 obj->layer->evas->engine.func->ector_begin(engine, context, 429 obj->layer->evas->engine.func->ector_begin(engine, context,
436 ector, surface, 430 ector, surface,
437 vd->engine_data, 431 vd->engine_data,