summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
authorBogdan Devichev <b.devichev@samsung.com>2014-12-12 17:23:49 +0200
committerCedric BAIL <cedric@osg.samsung.com>2014-12-23 21:20:21 +0100
commitdd605257984478674d2a5d4946a870f167e2bf69 (patch)
treeaf549bbd69a00d81f8d6bd9a05dc979431858cf9 /src/lib/evas/canvas
parent243df1aaba09a05ef65b8666d0a54c6b8f1cd6a2 (diff)
evas: a _mmap version of the file_set is added.
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/evas_3d_mesh.c14
-rw-r--r--src/lib/evas/canvas/evas_3d_mesh.eo15
2 files changed, 28 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_3d_mesh.c b/src/lib/evas/canvas/evas_3d_mesh.c
index 3e14e3a164..1868c0da6f 100644
--- a/src/lib/evas/canvas/evas_3d_mesh.c
+++ b/src/lib/evas/canvas/evas_3d_mesh.c
@@ -802,6 +802,18 @@ _evas_3d_mesh_blending_func_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd,
802} 802}
803 803
804EOLIAN static void 804EOLIAN static void
805_evas_3d_mesh_mmap_set(Eo *obj, Evas_3D_Mesh_Data *pd,
806 Eina_File *file, const char *key EINA_UNUSED)
807{
808 _mesh_fini(pd);
809 _mesh_init(pd);
810
811 if (file == NULL) return;
812
813 evas_common_load_model_from_eina_file(obj, file);
814}
815
816EOLIAN static void
805_evas_3d_mesh_file_set(Eo *obj, Evas_3D_Mesh_Data *pd, 817_evas_3d_mesh_file_set(Eo *obj, Evas_3D_Mesh_Data *pd,
806 const char *file, const char *key EINA_UNUSED) 818 const char *file, const char *key EINA_UNUSED)
807{ 819{
@@ -810,7 +822,7 @@ _evas_3d_mesh_file_set(Eo *obj, Evas_3D_Mesh_Data *pd,
810 822
811 if (file == NULL) return; 823 if (file == NULL) return;
812 824
813 evas_common_load_model_to_file(obj, file); 825 evas_common_load_model_from_file(obj, file);
814} 826}
815 827
816EOLIAN static void 828EOLIAN static void
diff --git a/src/lib/evas/canvas/evas_3d_mesh.eo b/src/lib/evas/canvas/evas_3d_mesh.eo
index 5bf623a994..e958ff4206 100644
--- a/src/lib/evas/canvas/evas_3d_mesh.eo
+++ b/src/lib/evas/canvas/evas_3d_mesh.eo
@@ -4,6 +4,21 @@ class Evas_3D_Mesh (Evas_3D_Object, Evas.Common_Interface)
4 data: Evas_3D_Mesh_Data; 4 data: Evas_3D_Mesh_Data;
5 5
6 methods { 6 methods {
7 mmap_set {
8 /**
9 * Load mesh data from Eina_File.
10 *
11 * Loading a mesh from existing Eina_File is supported. Currently, only MD2, OBJ,
12 * PLY and EET file formats are supported.
13 *
14 * @ingroup Evas_3D_Mesh
15 */
16 params {
17 @in Eina_File* file; /*@ Eina_File with mesh data. */
18 @in const(char)* key; /*@ Key in the mesh file. */
19 }
20 }
21
7 file_set { 22 file_set {
8 /** 23 /**
9 * Load mesh data from file. 24 * Load mesh data from file.