summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUlisses Furquim <ulisses@profusion.mobi>2012-12-28 13:00:37 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2012-12-28 13:00:37 +0000
commit5f493f2c38ac7d125407b8c1b47683f2eb201ce5 (patch)
treea2fc2808690044fc12bc997cbb690348fcfcac5c /src
parent4079b164b77332b21bb573e7be38b60418b6f318 (diff)
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 <ulisses@profusion.mobi> SVN revision: 81798
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_render.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 40a2a47874..1e924d7a23 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,
1337 e = eo_data_get(eo_e, EVAS_CLASS); 1337 e = eo_data_get(eo_e, EVAS_CLASS);
1338 if (!e->changed) return EINA_FALSE; 1338 if (!e->changed) return EINA_FALSE;
1339 1339
1340 if (e->rendering) return EINA_FALSE; 1340 if (do_async && e->rendering) return EINA_FALSE;
1341 e->rendering = EINA_TRUE;
1342
1343 if (do_async)
1344 {
1345 eo_ref(eo_e);
1346 e->render.data = updates_data;
1347 e->render.updates_cb = updates_func;
1348 }
1349 1341
1350#ifdef EVAS_CSERVE2 1342#ifdef EVAS_CSERVE2
1351 if (evas_cserve2_use_get()) 1343 if (evas_cserve2_use_get())
@@ -1708,6 +1700,11 @@ evas_render_updates_internal(Evas *eo_e,
1708 1700
1709 if (do_async) 1701 if (do_async)
1710 { 1702 {
1703 eo_ref(eo_e);
1704 e->rendering = EINA_TRUE;
1705 e->render.data = updates_data;
1706 e->render.updates_cb = updates_func;
1707
1711 evas_thread_queue_flush((Evas_Thread_Command_Cb)done_func, done_data, 0); 1708 evas_thread_queue_flush((Evas_Thread_Command_Cb)done_func, done_data, 0);
1712 } 1709 }
1713 else if (haveup) 1710 else if (haveup)
@@ -1934,7 +1931,6 @@ evas_render_updates_internal_wait(Evas *eo_e,
1934 1931
1935 ret = e->render.updates; 1932 ret = e->render.updates;
1936 e->render.updates = NULL; 1933 e->render.updates = NULL;
1937 e->rendering = EINA_FALSE;
1938 1934
1939 return ret; 1935 return ret;
1940} 1936}