forked from enlightenment/efl
elm_gengrid: speed up update order calls
update order can be quite expensive, so this here tries to skip it as often as possible. ref T7384 Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D8367
This commit is contained in:
parent
f1678d06c2
commit
04122ec311
|
@ -1268,6 +1268,7 @@ _elm_gengrid_item_unrealize(Elm_Gen_Item *it,
|
|||
{
|
||||
ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
|
||||
efl_ui_focus_manager_calc_unregister(sd->obj, EO_OBJ(it));
|
||||
sd->order_dirty = EINA_TRUE;
|
||||
}
|
||||
|
||||
evas_event_thaw(evas_object_evas_get(WIDGET(it)));
|
||||
|
@ -1601,6 +1602,7 @@ _item_realize(Elm_Gen_Item *it)
|
|||
if (!it->realized)
|
||||
{
|
||||
efl_ui_focus_manager_calc_register_logical(sd->obj, EO_OBJ(it), sd->obj, NULL);
|
||||
sd->order_dirty = EINA_TRUE;
|
||||
}
|
||||
|
||||
if ((it->realized) ||
|
||||
|
@ -4037,8 +4039,6 @@ _elm_gengrid_item_new(Elm_Gengrid_Data *sd,
|
|||
(!strcmp(it->itc->item_style, "group_index"));
|
||||
sd->item_count++;
|
||||
|
||||
efl_ui_focus_composition_dirty(sd->obj);
|
||||
|
||||
return it;
|
||||
}
|
||||
|
||||
|
@ -5824,6 +5824,9 @@ _elm_gengrid_efl_ui_focus_object_setup_order(Eo *obj, Elm_Gengrid_Data *pd)
|
|||
Elm_Gen_Item *item;
|
||||
Eina_List *order = NULL;
|
||||
|
||||
if (!pd->order_dirty) return;
|
||||
pd->order_dirty = EINA_FALSE;
|
||||
|
||||
EINA_INLIST_FOREACH(pd->items, item)
|
||||
{
|
||||
if (item->base->disabled)
|
||||
|
|
|
@ -154,6 +154,7 @@ struct _Elm_Gengrid_Data
|
|||
|
||||
Eina_Bool scr_minw;
|
||||
Eina_Bool scr_minh;
|
||||
Eina_Bool order_dirty; /* boolean flag indicating if there needs to be an update to the focus_order of the widget.*/
|
||||
};
|
||||
|
||||
struct Elm_Gen_Item_Type
|
||||
|
|
|
@ -54,10 +54,6 @@ _grid_realized_cb(void *data, const Efl_Event *ev)
|
|||
|
||||
if (!elm_object_item_disabled_get(data) && !is_group)
|
||||
{
|
||||
Elm_Widget_Item_Data *wpd = efl_data_scope_get(data, ELM_WIDGET_ITEM_CLASS);
|
||||
|
||||
//first prepare the container
|
||||
efl_ui_focus_object_setup_order(wpd->widget);
|
||||
efl_ui_focus_object_setup_order(data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue