edje - fix missing vector field frees, copies, handling etc.
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sun, 21 Aug 2016 02:30:45 +0000 (11:30 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sun, 21 Aug 2016 02:30:45 +0000 (11:30 +0900)
it seems vector type parts were not handled all that well. we had at
least one mem leak with the vector mempool never being freed... so i
filled in various missing points where vector parts were not being
handled right.

@fix

src/lib/edje/edje_cache.c
src/lib/edje/edje_calc.c
src/lib/edje/edje_data.c
src/lib/edje/edje_embryo.c

index ff6d0a7..03193a7 100644 (file)
@@ -86,6 +86,7 @@ edje_cache_emp_free(Edje_Part_Collection_Directory_Entry *ce)
    eina_mempool_del(ce->mp->mp_rtl.MESH_NODE);
    eina_mempool_del(ce->mp->mp_rtl.LIGHT);
    eina_mempool_del(ce->mp->mp_rtl.CAMERA);
+   eina_mempool_del(ce->mp->mp_rtl.VECTOR);
    memset(&ce->mp->mp_rtl, 0, sizeof(ce->mp->mp_rtl));
 }
 
index d7c738e..c193172 100644 (file)
@@ -334,6 +334,7 @@ case EDJE_PART_TYPE_##Short:                                          \
         POPULATE_MEMSIZE_RTL(CAMERA, Camera);
         POPULATE_MEMSIZE_RTL(LIGHT, Light);
         POPULATE_MEMSIZE_RTL(MESH_NODE, Mesh_Node);
+        POPULATE_MEMSIZE_RTL(VECTOR, Vector);
      }
 #undef POPULATE_MEMSIZE_RTL
 
index 7754c9e..0541844 100644 (file)
@@ -936,9 +936,9 @@ _edje_edd_init(void)
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.MESH_NODE", count.MESH_NODE, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.LIGHT", count.LIGHT, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.CAMERA", count.CAMERA, EET_T_INT);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.VECTOR", count.VECTOR, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.part", count.part, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "group_alias", group_alias, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.VECTOR", count.VECTOR, EET_T_INT);
 
    EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Style_Tag);
    _edje_edd_edje_style_tag =
index d019f76..bb46310 100644 (file)
@@ -2110,6 +2110,7 @@ case EDJE_PART_TYPE_##Short:                               \
         ALLOC_COPY_DESC(BOX, Box, d, box);
         ALLOC_COPY_DESC(TABLE, Table, d, table);
         ALLOC_COPY_DESC(EXTERNAL, External, d, external_params);
+        ALLOC_COPY_DESC(VECTOR, Vector, d, vg);
      }
 
    if (!d) return 0;