summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlisses Furquim <ulisses@profusion.mobi>2013-01-14 20:02:43 +0000
committerUlisses Furquim <ulisses@profusion.mobi>2013-01-14 20:02:43 +0000
commit0f435b7eaec2eb9d3de63afa0a2fd87f6c6c9256 (patch)
tree4a6ee4cc7567f133423c0b84bf2df8e19eaf82cb
parent90bba3a87e19261ac85be736f84fe29ebf962efc (diff)
evas/async_render: fixing mix of sync and async rendering
SVN revision: 82776
-rw-r--r--src/lib/evas/canvas/evas_render.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 42563cf5ec..0b7a056eda 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1352,10 +1352,15 @@ evas_render_updates_internal(Evas *eo_e,
1352 1352
1353 if (e->rendering) 1353 if (e->rendering)
1354 { 1354 {
1355 if (!do_async) 1355 if (do_async)
1356 ERR("Cannot render sync as already doing async render! e=%p [%s]", 1356 return EINA_FALSE;
1357 e, e->engine.module->definition->name); 1357 else
1358 return EINA_FALSE; 1358 {
1359 WRN("Mixing render sync as already doing async "
1360 "render! Syncing! e=%p [%s]", e,
1361 e->engine.module->definition->name);
1362 evas_render_rendering_wait(e);
1363 }
1359 } 1364 }
1360 1365
1361#ifdef EVAS_CSERVE2 1366#ifdef EVAS_CSERVE2
@@ -1845,6 +1850,8 @@ evas_render_wakeup(Evas *eo_e)
1845 Eina_Bool haveup = EINA_FALSE; 1850 Eina_Bool haveup = EINA_FALSE;
1846 Eina_List *ret_updates = NULL; 1851 Eina_List *ret_updates = NULL;
1847 Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); 1852 Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
1853 Evas_Event_Cb up_cb;
1854 void *up_data;
1848 1855
1849 EINA_LIST_FREE(e->render.updates, ru) 1856 EINA_LIST_FREE(e->render.updates, ru)
1850 { 1857 {
@@ -1881,14 +1888,15 @@ evas_render_wakeup(Evas *eo_e)
1881 eina_array_foreach(&e->glyph_unref_queue, _drop_glyph_ref, NULL); 1888 eina_array_foreach(&e->glyph_unref_queue, _drop_glyph_ref, NULL);
1882 eina_array_clean(&e->glyph_unref_queue); 1889 eina_array_clean(&e->glyph_unref_queue);
1883 1890
1884 evas_event_callback_call(eo_e, EVAS_CALLBACK_RENDER_POST, NULL); 1891 up_cb = e->render.updates_cb;
1885 1892 up_data = e->render.data;
1886 if (e->render.updates_cb)
1887 e->render.updates_cb(e->render.data, eo_e, ret_updates);
1888
1889 e->rendering = EINA_FALSE;
1890 e->render.updates_cb = NULL; 1893 e->render.updates_cb = NULL;
1891 e->render.data = NULL; 1894 e->render.data = NULL;
1895 e->rendering = EINA_FALSE;
1896
1897 evas_event_callback_call(eo_e, EVAS_CALLBACK_RENDER_POST, NULL);
1898
1899 if (up_cb) up_cb(up_data, eo_e, ret_updates);
1892 1900
1893 eo_unref(eo_e); 1901 eo_unref(eo_e);
1894} 1902}