From: Tae-Hwan Kim Date: Tue, 7 May 2013 06:22:08 +0000 (+0900) Subject: [Genlist] Remove to check scrolling flags for better performance X-Git-Tag: accepted/tizen/20130927.071315^2~352 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a56ec677debd6c2edc5f08b8a04f0383303ab7a8;p=profile%2Fmobile%2Felementary.git [Genlist] Remove to check scrolling flags for better performance Change-Id: I1dc62f625d8745b7a4d3b1af41ad648db53c2113 --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 8b50bb1..75c4585 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -4059,7 +4059,6 @@ _item_idle_enterer(void *data) { Elm_Genlist_Smart_Data *sd = data; - if (sd->scrolling) return ECORE_CALLBACK_RENEW; if (sd->prev_viewport_w == 0) return ECORE_CALLBACK_RENEW; if (_queue_process(sd) > 0) { @@ -4553,7 +4552,11 @@ _scroll_animate_start_cb(Evas_Object *obj, #if GENLIST_FX_SUPPORT _elm_genlist_fx_clear(obj, EINA_FALSE); #endif - sd->scrolling = EINA_TRUE; + if (sd->queue_idle_enterer) + { + ecore_idle_enterer_del(sd->queue_idle_enterer); + sd->queue_idle_enterer = NULL; + } evas_object_smart_callback_call(obj, SIG_SCROLL_ANIM_START, NULL); } @@ -4565,7 +4568,8 @@ _scroll_animate_stop_cb(Evas_Object *obj, #if GENLIST_FX_SUPPORT _elm_genlist_fx_clear(obj, EINA_FALSE); #endif - sd->scrolling = EINA_FALSE; + if (!sd->queue_idle_enterer) + sd->queue_idle_enterer = ecore_idle_enterer_add(_item_idle_enterer, sd); evas_object_smart_callback_call(obj, SIG_SCROLL_ANIM_STOP, NULL); } @@ -4573,8 +4577,6 @@ static void _scroll_drag_start_cb(Evas_Object *obj, void *data __UNUSED__) { - ELM_GENLIST_DATA_GET(obj, sd); - sd->scrolling = EINA_TRUE; evas_object_smart_callback_call(obj, SIG_SCROLL_DRAG_START, NULL); } @@ -4582,6 +4584,10 @@ static void _scroll_cb(Evas_Object *obj, void *data __UNUSED__) { + ELM_GENLIST_DATA_GET(obj, sd); + if (sd->queue_idle_enterer) + ecore_idle_enterer_del(sd->queue_idle_enterer); + sd->queue_idle_enterer = NULL; evas_object_smart_callback_call(obj, SIG_SCROLL, NULL); } @@ -4589,8 +4595,6 @@ static void _scroll_drag_stop_cb(Evas_Object *obj, void *data __UNUSED__) { - ELM_GENLIST_DATA_GET(obj, sd); - sd->scrolling = EINA_FALSE; evas_object_smart_callback_call(obj, SIG_SCROLL_DRAG_STOP, NULL); } diff --git a/src/lib/elm_widget_genlist.h b/src/lib/elm_widget_genlist.h index 3a31e21..07967d8 100644 --- a/src/lib/elm_widget_genlist.h +++ b/src/lib/elm_widget_genlist.h @@ -296,7 +296,6 @@ struct _Elm_Genlist_Smart_Data Evas_Coord pinch_pan_y, pinch_zoom_h; #endif Eina_Bool sorting : 1; - Eina_Bool scrolling : 1; }; typedef struct _Item_Block Item_Block;