feature: e_comp_shape_queue_block for blocking shape changes

in some cases, it may be desirable to block shape cutting for an amount of time to reduce cpu calculations. this should be set when performing any non-interactive compositor effects
This commit is contained in:
Mike Blumenkrantz 2013-10-16 09:30:37 +01:00
parent b3ea9e9e9d
commit ed4c98f9f5
2 changed files with 14 additions and 0 deletions

View File

@ -1385,6 +1385,18 @@ e_comp_shape_queue(E_Comp *c)
c->shape_job = ecore_job_add((Ecore_Cb)_e_comp_shapes_update_job, c);
}
EAPI void
e_comp_shape_queue_block(E_Comp *c, Eina_Bool block)
{
EINA_SAFETY_ON_NULL_RETURN(c);
c->shape_queue_blocked = !!block;
if (block)
E_FREE_FUNC(c->shape_job, ecore_job_del);
else
e_comp_shape_queue(c);
}
EAPI E_Comp_Config *
e_comp_config_get(void)
{

View File

@ -111,6 +111,7 @@ struct _E_Comp
Eina_Bool nocomp : 1;
Eina_Bool nocomp_want : 1;
Eina_Bool saver : 1;
Eina_Bool shape_queue_blocked : 1;
};
@ -137,6 +138,7 @@ EAPI int e_comp_internal_save(void);
EINTERN int e_comp_shutdown(void);
EAPI void e_comp_render_queue(E_Comp *c);
EAPI void e_comp_shape_queue(E_Comp *c);
EAPI void e_comp_shape_queue_block(E_Comp *c, Eina_Bool block);
EAPI E_Comp_Config *e_comp_config_get(void);
EAPI const Eina_List *e_comp_list(void);
EAPI void e_comp_shadows_reset(void);