jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5209aaebdbd946e94debb6f32d41e14f504a31d7

commit 5209aaebdbd946e94debb6f32d41e14f504a31d7
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Mon Apr 27 15:56:54 2015 +0900

    Evas masking: Free mask surfaces during evas dump
    
    On minimizing, free all mask surfaces. This could save a lot
    of memory.
    
    Also, write "proxy" COW only when there is a surface (the "proxy"
    pointer itself is always valid and non-NULL).
---
 src/lib/evas/canvas/evas_render.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 58bbd67..d172cd3 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -2913,19 +2913,24 @@ _evas_canvas_render_dump(Eo *eo_e, Evas_Public_Data *e)
 
              EINA_INLIST_FOREACH(lay->objects, obj)
                {
-                  if (obj->proxy)
+                  if (obj->proxy->surface)
                     {
                        EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, obj->proxy, 
Evas_Object_Proxy_Data, proxy_write)
                          {
-                            if (proxy_write->surface)
-                              {
-                                 
e->engine.func->image_map_surface_free(e->engine.data.output,
-                                                                        
proxy_write->surface);
-                                 proxy_write->surface = NULL;
-                              }
+                            
e->engine.func->image_map_surface_free(e->engine.data.output, 
proxy_write->surface);
+                            proxy_write->surface = NULL;
                          }
                        EINA_COW_WRITE_END(evas_object_proxy_cow, obj->proxy, 
proxy_write);
                     }
+                  if (obj->mask->surface)
+                    {
+                       EINA_COW_WRITE_BEGIN(evas_object_mask_cow, obj->mask, 
Evas_Object_Mask_Data, mdata)
+                         {
+                            
e->engine.func->image_map_surface_free(e->engine.data.output, mdata->surface);
+                            mdata->surface = NULL;
+                         }
+                       EINA_COW_WRITE_END(evas_object_mask_cow, obj->mask, 
mdata);
+                    }
                   if ((obj->type) && (!strcmp(obj->type, "image")))
                     evas_object_inform_call_image_unloaded(obj->object);
                   _evas_render_dump_map_surfaces(obj->object);

-- 


Reply via email to