only populate custom gadcons with the gadgets that are actually loaded in the gadcon: huge speedup
SVN revision: 74433
This commit is contained in:
parent
c2b2d7e5ad
commit
ec019bae91
|
@ -185,6 +185,7 @@ static Eina_Hash *providers = NULL;
|
||||||
static Eina_List *providers_list = NULL;
|
static Eina_List *providers_list = NULL;
|
||||||
static Eina_List *gadcons = NULL;
|
static Eina_List *gadcons = NULL;
|
||||||
static Eina_List *gadcon_idle_pos = NULL;
|
static Eina_List *gadcon_idle_pos = NULL;
|
||||||
|
static Eina_List *gadcon_custom_idle_pos = NULL;
|
||||||
static Eina_List *dummies = NULL;
|
static Eina_List *dummies = NULL;
|
||||||
static Eina_List *populate_requests = NULL;
|
static Eina_List *populate_requests = NULL;
|
||||||
static Ecore_Idler *populate_idler = NULL;
|
static Ecore_Idler *populate_idler = NULL;
|
||||||
|
@ -5145,24 +5146,42 @@ static Eina_Bool
|
||||||
_e_gadcon_custom_populate_idler(void *data __UNUSED__)
|
_e_gadcon_custom_populate_idler(void *data __UNUSED__)
|
||||||
{
|
{
|
||||||
const E_Gadcon_Client_Class *cc;
|
const E_Gadcon_Client_Class *cc;
|
||||||
|
E_Config_Gadcon_Client *cf_gcc;
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
E_Gadcon *gc;
|
E_Gadcon *gc;
|
||||||
|
double loop;
|
||||||
|
|
||||||
|
loop = ecore_loop_time_get();
|
||||||
EINA_LIST_FREE(custom_populate_requests, gc)
|
EINA_LIST_FREE(custom_populate_requests, gc)
|
||||||
{
|
{
|
||||||
|
if (ecore_loop_time_get() - loop >= ecore_animator_frametime_get()) break;
|
||||||
|
if (!gc->cf) continue;
|
||||||
e_gadcon_layout_freeze(gc->o_container);
|
e_gadcon_layout_freeze(gc->o_container);
|
||||||
EINA_LIST_FOREACH(providers_list, l, cc)
|
EINA_LIST_FOREACH(gadcon_custom_idle_pos ?: providers_list, gadcon_custom_idle_pos, cc)
|
||||||
{
|
{
|
||||||
if (gc->populate_class.func)
|
EINA_LIST_FOREACH(gc->cf->clients, l, cf_gcc)
|
||||||
gc->populate_class.func(gc->populate_class.data, gc, cc);
|
{
|
||||||
else
|
if (e_util_strcmp(cf_gcc->name, cc->name)) continue;
|
||||||
e_gadcon_populate_class(gc, cc);
|
if (ecore_loop_time_get() - loop >= ecore_animator_frametime_get())
|
||||||
|
{
|
||||||
|
e_gadcon_layout_thaw(gc->o_container);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
if (gc->populate_class.func)
|
||||||
|
gc->populate_class.func(gc->populate_class.data, gc, cc);
|
||||||
|
else
|
||||||
|
e_gadcon_populate_class(gc, cc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
e_gadcon_layout_thaw(gc->o_container);
|
e_gadcon_layout_thaw(gc->o_container);
|
||||||
}
|
}
|
||||||
|
out:
|
||||||
custom_populate_idler = NULL;
|
if (!custom_populate_requests)
|
||||||
return ECORE_CALLBACK_CANCEL;
|
{
|
||||||
|
custom_populate_idler = NULL;
|
||||||
|
return ECORE_CALLBACK_CANCEL;
|
||||||
|
}
|
||||||
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
|
Loading…
Reference in New Issue