[evas] Always clear recalc count of items that have been on calc list
authormike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 17 Nov 2011 04:31:43 +0000 (04:31 +0000)
committermike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 17 Nov 2011 04:31:43 +0000 (04:31 +0000)
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@65326 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_main.c
src/lib/canvas/evas_object_smart.c
src/lib/include/evas_private.h

index c658fb1..0a37b2c 100644 (file)
@@ -121,6 +121,7 @@ evas_new(void)
    e->hinting = EVAS_FONT_HINTING_BYTECODE;
    e->name_hash = eina_hash_string_superfast_new(NULL);
    eina_clist_init(&e->calc_list);
+   eina_clist_init(&e->calc_done);
 
 #define EVAS_ARRAY_SET(E, Array)               \
    eina_array_step_set(&E->Array, sizeof (E->Array), 4096);
index 528c0a6..e5c390f 100644 (file)
@@ -558,6 +558,8 @@ evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value)
    value = !!value;
    if (value)
      eina_clist_add_tail(&obj->layer->evas->calc_list, &obj->calc_entry);
+   else
+     eina_clist_add_tail(&obj->layer->evas->calc_done, &obj->calc_entry);
 
    if (o->need_recalculate == value) return;
 
@@ -630,7 +632,6 @@ evas_smart_objects_calculate_count_get(const Evas *e)
 void
 evas_call_smarts_calculate(Evas *e)
 {
-   Eina_Clist processed = EINA_CLIST_INIT(processed);
    Eina_Clist *elem;
    Evas_Object *obj;
 
@@ -646,7 +647,7 @@ evas_call_smarts_calculate(Evas *e)
         obj = EINA_CLIST_ENTRY(elem, Evas_Object, calc_entry);
         eina_clist_remove(&obj->calc_entry);
         if (obj->delete_me) continue;
-        eina_clist_add_tail(&processed, &obj->calc_entry);
+        eina_clist_add_tail(&e->calc_done, &obj->calc_entry);
 
         o = obj->object_data;
 
@@ -657,7 +658,7 @@ evas_call_smarts_calculate(Evas *e)
           }
      }
 
-   while (NULL != (elem = eina_clist_head(&processed)))
+   while (NULL != (elem = eina_clist_head(&e->calc_done)))
      {
         obj = EINA_CLIST_ENTRY(elem, Evas_Object, calc_entry);
         obj->recalculate_cycle = 0;
index 2a3f624..90498d0 100644 (file)
@@ -356,6 +356,7 @@ struct _Evas
    Eina_Array     clip_changes;
 
    Eina_Clist     calc_list;
+   Eina_Clist     calc_done;
    Eina_List     *video_objects;
 
    Eina_List     *post_events; // free me on evas_free