summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2017-05-05 17:06:15 -0700
committerCedric Bail <cedric@osg.samsung.com>2017-05-05 17:55:06 -0700
commit7b4b7b66966c156634ab5920fc1ddf48282634c8 (patch)
treef64147d91162d69f00d3b326c732fa22bd1e6523 /src/lib/ecore_evas
parent385acef7f9d0bd733bd47165496168b52bd99f3f (diff)
ecore_evas: add logic to allow partial refactoring of backends.
Diffstat (limited to 'src/lib/ecore_evas')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c15
-rw-r--r--src/lib/ecore_evas/ecore_evas_private.h25
2 files changed, 26 insertions, 14 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 50ad308dfa..5eb48c43e6 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -151,8 +151,6 @@ ecore_evas_render_wait(Ecore_Evas *ee)
151EAPI Eina_Bool 151EAPI Eina_Bool
152ecore_evas_render(Ecore_Evas *ee) 152ecore_evas_render(Ecore_Evas *ee)
153{ 153{
154 Eina_List *ll;
155 Ecore_Evas *ee2;
156 Eina_Bool rend = EINA_FALSE; 154 Eina_Bool rend = EINA_FALSE;
157 155
158 if (ee->in_async_render) 156 if (ee->in_async_render)
@@ -165,18 +163,7 @@ ecore_evas_render(Ecore_Evas *ee)
165 if (!ee->engine.func->fn_prepare(ee)) 163 if (!ee->engine.func->fn_prepare(ee))
166 return EINA_FALSE; 164 return EINA_FALSE;
167 165
168 EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2) 166 rend = ecore_evas_render_prepare(ee);
169 {
170 if (ee2->engine.func->fn_render)
171 rend |= ee2->engine.func->fn_render(ee2);
172 else
173 rend |= ecore_evas_render(ee2);
174 }
175 // We do not force the child to be sync, so we should wait for them to be done
176 EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
177 ecore_evas_render_wait(ee2);
178
179 if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee);
180 167
181 ee->in_async_render = 1; 168 ee->in_async_render = 1;
182 169
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index 6f1d8293ef..d6fd15d904 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -479,6 +479,31 @@ Eina_Bool _ecore_evas_cursors_init(Ecore_Evas *ee);
479EAPI void ecore_evas_render_wait(Ecore_Evas *ee); 479EAPI void ecore_evas_render_wait(Ecore_Evas *ee);
480EAPI Eina_Bool ecore_evas_render(Ecore_Evas *ee); 480EAPI Eina_Bool ecore_evas_render(Ecore_Evas *ee);
481 481
482static inline Eina_Bool
483ecore_evas_render_prepare(Ecore_Evas *ee)
484{
485 Ecore_Evas *ee2;
486 Eina_List *ll;
487 Eina_Bool r = EINA_FALSE;
488
489 EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
490 {
491 if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
492 if (ee2->engine.func->fn_render)
493 r |= ee2->engine.func->fn_render(ee2);
494 else
495 r |= ecore_evas_render(ee2);
496 if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2);
497 }
498
499 // We do not force the child to be sync, so we should wait for them to be done
500 EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
501 if (!ee2->engine.func->fn_render)
502 ecore_evas_render_wait(ee2);
503
504 if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee);
505 return r;
506}
482 507
483#undef EAPI 508#undef EAPI
484#define EAPI 509#define EAPI