summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_smart.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-01 19:04:42 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-01 19:11:39 +0900
commit1d0b500fa8ce93ac6cd9211abd35ea8972be74b2 (patch)
tree42aef01c896b1084f91a42b051b82741112d5b9b /src/lib/edje/edje_smart.c
parentd27f5fcab78cabe880e9b3f2a62ac633d97ce381 (diff)
edje - reduce memory footrpint by dlopening ephysics on demand
this saves about another 80Kb or so in dirty pages by only loading ephysics when needed. This removed ephysics and bullet library dirty pages from the process space. this is another patch to address T4227. @fix
Diffstat (limited to 'src/lib/edje/edje_smart.c')
-rw-r--r--src/lib/edje/edje_smart.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index dff5823..03fda4c 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -156,10 +156,13 @@ _edje_object_efl_canvas_group_group_del(Eo *obj, Edje *ed)
156 if (_edje_lua_script_only(ed)) _edje_lua_script_only_shutdown(ed); 156 if (_edje_lua_script_only(ed)) _edje_lua_script_only_shutdown(ed);
157#ifdef HAVE_EPHYSICS 157#ifdef HAVE_EPHYSICS
158 /* clear physics world / shutdown ephysics */ 158 /* clear physics world / shutdown ephysics */
159 if ((ed->collection) && (ed->collection->physics_enabled)) 159 if ((ed->collection) && (ed->collection->physics_enabled) && (ed->world))
160 { 160 {
161 ephysics_world_del(ed->world); 161 if (EPH_LOAD())
162 ephysics_shutdown(); 162 {
163 EPH_CALL(ephysics_world_del)(ed->world);
164 EPH_CALL(ephysics_shutdown)();
165 }
163 } 166 }
164#endif 167#endif
165 if (ed->persp) edje_object_perspective_set(obj, NULL); 168 if (ed->persp) edje_object_perspective_set(obj, NULL);
@@ -272,9 +275,12 @@ _edje_object_efl_canvas_group_group_resize(Eo *obj EINA_UNUSED, Edje *ed, Evas_C
272 ed->h = h; 275 ed->h = h;
273#ifdef HAVE_EPHYSICS 276#ifdef HAVE_EPHYSICS
274 if ((ed->collection) && (ed->world)) 277 if ((ed->collection) && (ed->world))
275 ephysics_world_render_geometry_set( 278 {
276 ed->world, ed->x, ed->y, ed->collection->physics.world.z, 279 if (EPH_LOAD())
277 ed->w, ed->h, ed->collection->physics.world.depth); 280 EPH_CALL(ephysics_world_render_geometry_set)
281 (ed->world, ed->x, ed->y, ed->collection->physics.world.z,
282 ed->w, ed->h, ed->collection->physics.world.depth);
283 }
278#endif 284#endif
279#ifdef EDJE_CALC_CACHE 285#ifdef EDJE_CALC_CACHE
280 ed->all_part_change = EINA_TRUE; 286 ed->all_part_change = EINA_TRUE;