evas - update map smart members when really it needs to render.
authorChunEon Park <chuneon.park@samsung.com>
Sun, 5 May 2013 15:48:56 +0000 (00:48 +0900)
committerChunEon Park <chuneon.park@samsung.com>
Sun, 5 May 2013 15:48:56 +0000 (00:48 +0900)
ChangeLog
NEWS
src/lib/evas/canvas/evas_render.c

index 73afe79..50af5f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-05-06  ChunEon Park (Hermet)
+
+        * Evas: update the map smart members really when it needs to render.
+
 2013-05-05  Jiyoun Park (jypark)
 
         * Ecore_Input_Evas: Fix ecore_input_evas didn't check the device id of mouse event
diff --git a/NEWS b/NEWS
index d5cbb97..cd4c491 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -157,6 +157,7 @@ Improvements:
     * Evas textblock : Added split cursor for BiDi text
     * Evas works around MESA/intel xorg bug where alpha channel of non-argb windows is not filled in with 0xff.
     * edje entry: remove duplicated ecore_imf_context_reset in adjusting the selection
+    * Evas: update the map smart members really when it needs to render.
 
 Fixes:
     * Fix a memory leak in ecore_con_dns when using ecore_con_server_connect
index 6db7a29..7b4727c 100644 (file)
@@ -976,6 +976,30 @@ _evas_render_can_use_overlay(Evas_Public_Data *e, Evas_Object *eo_obj)
 }
 
 Eina_Bool
+_smart_members_changed_check(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
+{
+   Evas_Object_Protected_Data *o2;
+   Eina_Bool changed = EINA_FALSE;
+
+   if (!evas_object_is_visible(eo_obj, obj) &&
+       !evas_object_was_visible(eo_obj, obj))
+     return EINA_FALSE;
+
+   if (!obj->smart.smart) return EINA_TRUE;
+   if (obj->changed_color) return EINA_TRUE;
+   if ((obj->changed_pchange) && (obj->changed_map)) return EINA_TRUE;
+
+   EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), o2)
+     {
+        if (!o2->changed) continue;
+        changed |= _smart_members_changed_check(o2->object, o2);
+        if (changed) return EINA_TRUE;
+     }
+
+   return changed;
+}
+
+Eina_Bool
 evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
                    Evas_Object_Protected_Data *obj, void *context,
                    void *surface, int off_x, int off_y, int mapped, int ecx,
@@ -1099,22 +1123,14 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
           }
         if (obj->is_smart)
           {
-             Evas_Object *eo_o2;
              Evas_Object_Protected_Data *o2;
 
-             EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), o2)
+             EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj),
+                                 o2)
                {
-                  eo_o2 = o2->object;
-                  if (!evas_object_is_visible(eo_o2, o2) &&
-                      !evas_object_was_visible(eo_o2, o2))
-                    {
-                       continue;
-                    }
-                  if (o2->changed)
-                    {
-                       changed = EINA_TRUE;
-                       break;
-                    }
+                  if (!o2->changed) continue;
+                  changed = _smart_members_changed_check(o2->object, o2);
+                  if (changed) break;
                }
              if (obj->changed_color) changed = EINA_TRUE;
           }