From 5f493f2c38ac7d125407b8c1b47683f2eb201ce5 Mon Sep 17 00:00:00 2001 From: Ulisses Furquim Date: Fri, 28 Dec 2012 13:00:37 +0000 Subject: [PATCH] evas/evas_render: use rendering flag only when async rendering Also postpone marking the rendering flag until we know we will have the draw thread do its work. This way we avoid waiting forever at evas_render_rendering_wait() when the draw thread is also blocked. Patch by: Ulisses Furquim SVN revision: 81798 --- src/lib/evas/canvas/evas_render.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 40a2a47..1e924d7 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -1337,15 +1337,7 @@ evas_render_updates_internal(Evas *eo_e, e = eo_data_get(eo_e, EVAS_CLASS); if (!e->changed) return EINA_FALSE; - if (e->rendering) return EINA_FALSE; - e->rendering = EINA_TRUE; - - if (do_async) - { - eo_ref(eo_e); - e->render.data = updates_data; - e->render.updates_cb = updates_func; - } + if (do_async && e->rendering) return EINA_FALSE; #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) @@ -1708,6 +1700,11 @@ evas_render_updates_internal(Evas *eo_e, if (do_async) { + eo_ref(eo_e); + e->rendering = EINA_TRUE; + e->render.data = updates_data; + e->render.updates_cb = updates_func; + evas_thread_queue_flush((Evas_Thread_Command_Cb)done_func, done_data, 0); } else if (haveup) @@ -1934,7 +1931,6 @@ evas_render_updates_internal_wait(Evas *eo_e, ret = e->render.updates; e->render.updates = NULL; - e->rendering = EINA_FALSE; return ret; } -- 2.7.4