summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-10-26 13:35:27 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-10-26 13:35:27 -0700
commit84907e719de3b4700e5c2390b251b3b1d8e9437d (patch)
tree9ddefc78c8308bee4ba9361df59fc16962bc2e0f /src/lib/evas
parentabd41c93ea5a883718b57d1c4a461defde7f7d99 (diff)
evas: allow to suspend the rendering of an output.
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/canvas/evas_out.c7
-rw-r--r--src/lib/evas/canvas/evas_render.c3
-rw-r--r--src/lib/evas/include/evas_private.h2
3 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index cd7fbaf2d8..34e2933469 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -172,13 +172,14 @@ efl_canvas_output_engine_info_get(Efl_Canvas_Output *output)
172} 172}
173 173
174EAPI Eina_Bool 174EAPI Eina_Bool
175efl_canvas_output_lock(Efl_Canvas_Output *output EINA_UNUSED) 175efl_canvas_output_lock(Efl_Canvas_Output *output)
176{ 176{
177 return EINA_FALSE; 177 output->lock++;
178 return EINA_TRUE;
178} 179}
179 180
180EAPI Eina_Bool 181EAPI Eina_Bool
181efl_canvas_output_unlock(Efl_Canvas_Output *output EINA_UNUSED) 182efl_canvas_output_unlock(Efl_Canvas_Output *output EINA_UNUSED)
182{ 183{
183 return EINA_FALSE; 184 return !!(--output->lock);
184} 185}
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 3f1895de2d..9e6a65859f 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -3319,6 +3319,9 @@ evas_render_updates_internal(Evas *eo_e,
3319 { 3319 {
3320 // Avoid processing not ready output until they are 3320 // Avoid processing not ready output until they are
3321 if (!out->output) continue ; 3321 if (!out->output) continue ;
3322 // Locked output are output that should not yet be rendered
3323 // because the tick/vsync for it doesn't allow it yet.
3324 if (out->lock > 0) continue ;
3322 3325
3323 /* phase 6. Initialize output */ 3326 /* phase 6. Initialize output */
3324 if (out->changed) 3327 if (out->changed)
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index bc7c1f9aba..8a16d63e68 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1336,6 +1336,8 @@ struct _Efl_Canvas_Output
1336 1336
1337 int info_magic; 1337 int info_magic;
1338 1338
1339 unsigned short lock;
1340
1339 Eina_Bool changed : 1; 1341 Eina_Bool changed : 1;
1340}; 1342};
1341 1343