forked from enlightenment/efl
evas: allow to suspend the rendering of an output.
This commit is contained in:
parent
abd41c93ea
commit
84907e719d
|
@ -172,13 +172,14 @@ efl_canvas_output_engine_info_get(Efl_Canvas_Output *output)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
efl_canvas_output_lock(Efl_Canvas_Output *output EINA_UNUSED)
|
efl_canvas_output_lock(Efl_Canvas_Output *output)
|
||||||
{
|
{
|
||||||
return EINA_FALSE;
|
output->lock++;
|
||||||
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
efl_canvas_output_unlock(Efl_Canvas_Output *output EINA_UNUSED)
|
efl_canvas_output_unlock(Efl_Canvas_Output *output EINA_UNUSED)
|
||||||
{
|
{
|
||||||
return EINA_FALSE;
|
return !!(--output->lock);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3319,6 +3319,9 @@ evas_render_updates_internal(Evas *eo_e,
|
||||||
{
|
{
|
||||||
// Avoid processing not ready output until they are
|
// Avoid processing not ready output until they are
|
||||||
if (!out->output) continue ;
|
if (!out->output) continue ;
|
||||||
|
// Locked output are output that should not yet be rendered
|
||||||
|
// because the tick/vsync for it doesn't allow it yet.
|
||||||
|
if (out->lock > 0) continue ;
|
||||||
|
|
||||||
/* phase 6. Initialize output */
|
/* phase 6. Initialize output */
|
||||||
if (out->changed)
|
if (out->changed)
|
||||||
|
|
|
@ -1336,6 +1336,8 @@ struct _Efl_Canvas_Output
|
||||||
|
|
||||||
int info_magic;
|
int info_magic;
|
||||||
|
|
||||||
|
unsigned short lock;
|
||||||
|
|
||||||
Eina_Bool changed : 1;
|
Eina_Bool changed : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue