forked from enlightenment/enlightenment
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:
parent
b3ea9e9e9d
commit
ed4c98f9f5
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue