forked from enlightenment/enlightenment
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 *gadcons = NULL;
|
||||
static Eina_List *gadcon_idle_pos = NULL;
|
||||
static Eina_List *gadcon_custom_idle_pos = NULL;
|
||||
static Eina_List *dummies = NULL;
|
||||
static Eina_List *populate_requests = NULL;
|
||||
static Ecore_Idler *populate_idler = NULL;
|
||||
|
@ -5145,25 +5146,43 @@ static Eina_Bool
|
|||
_e_gadcon_custom_populate_idler(void *data __UNUSED__)
|
||||
{
|
||||
const E_Gadcon_Client_Class *cc;
|
||||
E_Config_Gadcon_Client *cf_gcc;
|
||||
const Eina_List *l;
|
||||
E_Gadcon *gc;
|
||||
double loop;
|
||||
|
||||
loop = ecore_loop_time_get();
|
||||
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);
|
||||
EINA_LIST_FOREACH(providers_list, l, cc)
|
||||
EINA_LIST_FOREACH(gadcon_custom_idle_pos ?: providers_list, gadcon_custom_idle_pos, cc)
|
||||
{
|
||||
EINA_LIST_FOREACH(gc->cf->clients, l, cf_gcc)
|
||||
{
|
||||
if (e_util_strcmp(cf_gcc->name, cc->name)) continue;
|
||||
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);
|
||||
}
|
||||
|
||||
out:
|
||||
if (!custom_populate_requests)
|
||||
{
|
||||
custom_populate_idler = NULL;
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_gadcon_provider_populate_idler(void *data __UNUSED__)
|
||||
|
|
Loading…
Reference in New Issue