evas: allow to suspend the rendering of an output.

This commit is contained in:
Cedric BAIL 2017-10-26 13:35:27 -07:00
parent abd41c93ea
commit 84907e719d
3 changed files with 9 additions and 3 deletions

View File

@ -172,13 +172,14 @@ efl_canvas_output_engine_info_get(Efl_Canvas_Output *output)
}
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
efl_canvas_output_unlock(Efl_Canvas_Output *output EINA_UNUSED)
{
return EINA_FALSE;
return !!(--output->lock);
}

View File

@ -3319,6 +3319,9 @@ evas_render_updates_internal(Evas *eo_e,
{
// Avoid processing not ready output until they are
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 */
if (out->changed)

View File

@ -1336,6 +1336,8 @@ struct _Efl_Canvas_Output
int info_magic;
unsigned short lock;
Eina_Bool changed : 1;
};