raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8296470e36d845d3ec4afea42d69f71e3a60ed8c

commit 8296470e36d845d3ec4afea42d69f71e3a60ed8c
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sat Aug 2 13:16:27 2014 +0900

    ecore-evas - fix continual wakeups with unchanged canvases
    
    this fixes a nasty bug where ecore-evas forces mainloop spins all the
    time due to trying to align rendraws to animator boundaries. this
    requires an extra evas feature to work that i just put in.
    
    @fix
---
 src/lib/ecore_evas/ecore_evas.c | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 224220a..c5be4aa 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -63,6 +63,31 @@ _ecore_evas_animator(void *data EINA_UNUSED)
      }
    return EINA_TRUE;
 }
+
+static Eina_Bool
+_ecore_evas_changes_get(Ecore_Evas *ee)
+{
+   Eina_List *l;
+
+   if (evas_changed_get(ee->evas)) return EINA_TRUE;
+   EINA_LIST_FOREACH(ee->sub_ecore_evas, l, ee)
+     {
+        if (evas_changed_get(ee->evas)) return EINA_TRUE;
+     }
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_ecore_evas_changes_check(void)
+{
+   Ecore_Evas *ee;
+
+   EINA_INLIST_FOREACH(ecore_evases, ee)
+     {
+        if (_ecore_evas_changes_get(ee)) return EINA_TRUE;
+     }
+   return EINA_FALSE;
+}
 #endif
 
 static Eina_Bool
@@ -84,10 +109,13 @@ _ecore_evas_idle_enter(void *data EINA_UNUSED)
         if ((!ecore_evas_animator_ticked) &&
             (!ecore_main_loop_animator_ticked_get()))
           {
-             if (!ecore_evas_animator)
+             if (_ecore_evas_changes_check())
                {
-                  overtick = 1;
-                  ecore_evas_animator = 
ecore_animator_add(_ecore_evas_animator, NULL);
+                  if (!ecore_evas_animator)
+                    {
+                       overtick = 1;
+                       ecore_evas_animator = 
ecore_animator_add(_ecore_evas_animator, NULL);
+                    }
                }
              return ECORE_CALLBACK_RENEW;
           }

-- 


Reply via email to