[EGIT] [core/efl] master 01/01: evas_3d: fix coverity scan CID 1302703 and CID 1302702

2015-06-03 Thread Bogdan Devichev
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8369dfd28fc60cbc021dabc7e1f73bf5d4e672a6

commit 8369dfd28fc60cbc021dabc7e1f73bf5d4e672a6
Author: Bogdan Devichev b.devic...@samsung.com
Date:   Wed Jun 3 21:26:34 2015 +0900

evas_3d: fix coverity scan CID 1302703 and CID 1302702

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2613
---
 src/lib/evas/canvas/evas_3d_primitive.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/src/lib/evas/canvas/evas_3d_primitive.c 
b/src/lib/evas/canvas/evas_3d_primitive.c
index 34ecab6..6314c4a 100644
--- a/src/lib/evas/canvas/evas_3d_primitive.c
+++ b/src/lib/evas/canvas/evas_3d_primitive.c
@@ -14,13 +14,6 @@ _primitive_init(Evas_3D_Primitive_Data *pd)
pd-tex_scale.y = 1.0;
 }
 
-static inline void
-_primitive_fini(Evas_3D_Primitive_Data *pd)
-{
-   if (pd-surface)
- free(pd-surface);
-}
-
 EAPI Evas_3D_Primitive *
 evas_3d_primitive_add(Evas *e)
 {
@@ -44,7 +37,6 @@ _evas_3d_primitive_eo_base_constructor(Eo *obj, 
Evas_3D_Primitive_Data *pd)
 EOLIAN static void
 _evas_3d_primitive_eo_base_destructor(Eo *obj, Evas_3D_Primitive_Data *pd)
 {
-   _primitive_fini(pd);
eo_do_super(obj, MY_CLASS, eo_destructor());
 }
 

-- 




[EGIT] [core/efl] master 03/03: evas: Evas_3D examples use new API for creating primitives.

2015-05-29 Thread Bogdan Devichev
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0972211144adcf09170d41ceacb62788fb954651

commit 0972211144adcf09170d41ceacb62788fb954651
Author: Bogdan Devichev b.devic...@samsung.com
Date:   Fri May 29 18:14:08 2015 +0200

evas: Evas_3D examples use new API for creating primitives.

Summary: Examples changed due to D2516

Reviewers: Oleksander, Hermet, raster, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2517

Signed-off-by: Cedric BAIL ced...@osg.samsung.com
---
 src/examples/evas/Makefile.am  |  22 +-
 src/examples/evas/evas-3d-aabb.c   |  17 +-
 src/examples/evas/evas-3d-blending.c   |  26 +-
 src/examples/evas/evas-3d-colorpick.c  |  11 +-
 src/examples/evas/evas-3d-cube-rotate.c|  14 +-
 src/examples/evas/evas-3d-cube2.c  |  11 +-
 src/examples/evas/evas-3d-fog.c|  27 +-
 src/examples/evas/evas-3d-frustum.c|  31 +-
 src/examples/evas/evas-3d-parallax-occlusion.c |  14 +-
 src/examples/evas/evas-3d-pick.c   |  12 +-
 src/examples/evas/evas-3d-primitives.c | 620 -
 src/examples/evas/evas-3d-primitives.h |  59 --
 src/examples/evas/evas-3d-proxy.c  |  11 +-
 src/examples/evas/evas-3d-shadows.c|  72 ++-
 src/examples/evas/shooter/evas-3d-shooter-header.h |   2 +-
 src/examples/evas/shooter/evas-3d-shooter-macros.h |  12 +
 src/examples/evas/shooter/evas-3d-shooter.c|  16 +-
 17 files changed, 197 insertions(+), 780 deletions(-)

diff --git a/src/examples/evas/Makefile.am b/src/examples/evas/Makefile.am
index 986ad9a..522345c 100644
--- a/src/examples/evas/Makefile.am
+++ b/src/examples/evas/Makefile.am
@@ -205,17 +205,17 @@ evas_3d_cube_LDADD = $(ECORE_EVAS_COMMON_LDADD) 
@EFL_PTHREAD_LIBS@
 evas_3d_cube_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
 EXTRA_PROGRAMS += evas_3d_cube2
-evas_3d_cube2_SOURCES = evas-3d-cube2.c evas-3d-primitives.c 
evas-3d-primitives.h
+evas_3d_cube2_SOURCES = evas-3d-cube2.c
 evas_3d_cube2_LDADD = $(ECORE_EVAS_COMMON_LDADD) @EFL_PTHREAD_LIBS@
 evas_3d_cube2_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
 EXTRA_PROGRAMS += evas_3d_proxy
-evas_3d_proxy_SOURCES = evas-3d-proxy.c evas-3d-primitives.c 
evas-3d-primitives.h
+evas_3d_proxy_SOURCES = evas-3d-proxy.c
 evas_3d_proxy_LDADD = $(ECORE_EVAS_COMMON_LDADD) @EFL_PTHREAD_LIBS@
 evas_3d_proxy_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
 EXTRA_PROGRAMS += evas_3d_pick
-evas_3d_pick_SOURCES = evas-3d-pick.c evas-3d-primitives.c evas-3d-primitives.h
+evas_3d_pick_SOURCES = evas-3d-pick.c
 evas_3d_pick_LDADD = $(ECORE_EVAS_COMMON_LDADD) @EFL_PTHREAD_LIBS@
 evas_3d_pick_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
@@ -235,27 +235,27 @@ evas_3d_ply_LDADD = $(ECORE_EVAS_COMMON_LDADD) 
@EFL_PTHREAD_LIBS@
 evas_3d_ply_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
 EXTRA_PROGRAMS += evas_3d_frustum
-evas_3d_frustum_SOURCES = evas-3d-frustum.c evas-3d-primitives.c 
evas-3d-primitives.h
+evas_3d_frustum_SOURCES = evas-3d-frustum.c
 evas_3d_frustum_LDADD = $(ECORE_EVAS_COMMON_LDADD) @EFL_PTHREAD_LIBS@
 evas_3d_frustum_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
 EXTRA_PROGRAMS += evas_3d_aabb
-evas_3d_aabb_SOURCES = evas-3d-aabb.c evas-3d-primitives.c evas-3d-primitives.h
+evas_3d_aabb_SOURCES = evas-3d-aabb.c
 evas_3d_aabb_LDADD = $(ECORE_EVAS_COMMON_LDADD) @EFL_PTHREAD_LIBS@
 evas_3d_aabb_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
 EXTRA_PROGRAMS += evas_3d_cube_rotate
-evas_3d_cube_rotate_SOURCES = evas-3d-cube-rotate.c evas-3d-primitives.c 
evas-3d-primitives.h
+evas_3d_cube_rotate_SOURCES = evas-3d-cube-rotate.c
 evas_3d_cube_rotate_LDADD = $(ECORE_EVAS_COMMON_LDADD) @EFL_PTHREAD_LIBS@
 evas_3d_cube_rotate_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
 EXTRA_PROGRAMS += evas_3d_shadows
-evas_3d_shadows_SOURCES = evas-3d-shadows.c evas-3d-primitives.c 
evas-3d-primitives.h
+evas_3d_shadows_SOURCES = evas-3d-shadows.c
 evas_3d_shadows_LDADD = $(ECORE_EVAS_COMMON_LDADD) @EFL_PTHREAD_LIBS@
 evas_3d_shadows_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
 EXTRA_PROGRAMS += evas_3d_shooter
-evas_3d_shooter_SOURCES = shooter/evas-3d-shooter.c 
shooter/evas-3d-shooter-header.c evas-3d-primitives.c evas-3d-primitives.h
+evas_3d_shooter_SOURCES = shooter/evas-3d-shooter.c 
shooter/evas-3d-shooter-header.c
 evas_3d_shooter_LDADD = $(ECORE_EVAS_COMMON_LDADD) @EFL_PTHREAD_LIBS@
 evas_3d_shooter_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
@@ -265,7 +265,7 @@ evas_3d_obj_LDADD = $(ECORE_EVAS_COMMON_LDADD) 
@EFL_PTHREAD_LIBS@
 evas_3d_obj_CPPFLAGS = $(ECORE_EVAS_COMMON_CPPFLAGS)
 
 EXTRA_PROGRAMS += evas_3d_blending
-evas_3d_blending_SOURCES = evas-3d-blending.c evas-3d-primitives.c
+evas_3d_blending_SOURCES = evas-3d-blending.c
 evas_3d_blending_LDADD = $(ECORE_EVAS_COMMON_LDADD) @EFL_PTHREAD_LIBS

[EGIT] [core/efl] master 22/55: evas: primitives - Changed enum for types of Evas_3D_Mesh primitives

2015-05-07 Thread Bogdan Devichev
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=04038dfaefa81e39988b3dc90b84da73dfea5e1f

commit 04038dfaefa81e39988b3dc90b84da73dfea5e1f
Author: Bogdan Devichev b.devic...@samsung.com
Date:   Wed Apr 22 15:27:49 2015 +0200

evas: primitives - Changed enum for types of Evas_3D_Mesh primitives

Summary:
**`Creating API for primitives.`**

//What should be in the end://

- Class evas_3d_primitive inherited from eo.base
- Unificated API of mesh for setting data from primitives
- API's of primitives to get/set precision, ratio, type, tex_scale etc.
- code of primitives in separated modules

//Steps://

**1.) Enum for types of primitives**
2.) Copies of primitives in modules
3.) Eo and c files for class of primitive
4.) In common create picker of module
5.) API function in mesh.c
6.) Binding of new realization
7.) Rewriting of examples
8.) Deleting of old files for primitives

//Also this commit will be usable in parsing EDC by edje//

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2359

Signed-off-by: Cedric BAIL ced...@osg.samsung.com
---
 src/lib/evas/Evas_Eo.h | 20 +---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h
index 2964442..8850a45 100644
--- a/src/lib/evas/Evas_Eo.h
+++ b/src/lib/evas/Evas_Eo.h
@@ -721,12 +721,26 @@ typedef enum _Evas_3D_Wrap_Mode
  */
 typedef enum _Evas_3D_Mesh_Primitive
 {
+   /** An empty space */
EVAS_3D_MESH_PRIMITIVE_NONE = 0,
-   EVAS_3D_MESH_PRIMITIVE_CUBE = 1,
-   EVAS_3D_MESH_PRIMITIVE_SPHERE = 2
+   /** One sided square */
+   EVAS_3D_MESH_PRIMITIVE_SQUARE,
+   /** Cube */
+   EVAS_3D_MESH_PRIMITIVE_CUBE,
+   /** Cylinder (can use precision and texture scale) */
+   EVAS_3D_MESH_PRIMITIVE_CYLINDER,
+   /** Cone (can use precision and texture scale) */
+   EVAS_3D_MESH_PRIMITIVE_CONE,
+   /** Sphere (can use precision and texture scale) */
+   EVAS_3D_MESH_PRIMITIVE_SPHERE,
+   /** Torus (can use ratio, precision and texture scale) */
+   EVAS_3D_MESH_PRIMITIVE_TORUS,
+   /** Custom surface (can use pointer to users function, precision and 
texture scale) */
+   EVAS_3D_MESH_PRIMITIVE_SURFACE,
+   /** Terrain as surface with pointer to Perlin's noise function */
+   EVAS_3D_MESH_PRIMITIVE_TERRAIN
 } Evas_3D_Mesh_Primitive;
 
-
 /**
  * Texture filters
  *

--