[evas] Always clear recalc count of items that have been on calc list

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 65326
This commit is contained in:
Mike McCormack 2011-11-17 04:31:43 +00:00 committed by Mike McCormack
parent 9fad5fc6f0
commit 997a3aa756
3 changed files with 6 additions and 3 deletions

View 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);

View 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;

View 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