summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines/sdl
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-05-08 15:03:31 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-05-08 15:03:31 -0700
commitdb1e8e2d924775d280491243924f5fb6bc93fa06 (patch)
tree0baa3b7119822e44c83d5e1fb25e448630aeea14 /src/modules/ecore_evas/engines/sdl
parent83513f0933765a588f3bd2fe691da55506f2247c (diff)
ecore_evas: refactor sdl backend to use generic render infrastructure.
Diffstat (limited to 'src/modules/ecore_evas/engines/sdl')
-rw-r--r--src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c36
1 files changed, 1 insertions, 35 deletions
diff --git a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
index 0c4d286ee7..5374b48fcd 100644
--- a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
+++ b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
@@ -203,39 +203,6 @@ _ecore_evas_sdl_event_video_expose(void *data EINA_UNUSED, int type EINA_UNUSED,
203 return ECORE_CALLBACK_PASS_ON; 203 return ECORE_CALLBACK_PASS_ON;
204} 204}
205 205
206static int
207_ecore_evas_render(Ecore_Evas *ee)
208{
209 Eina_List *updates;
210
211 updates = evas_render_updates(ee->evas);
212 if (updates)
213 {
214 evas_render_updates_free(updates);
215 _ecore_evas_idle_timeout_update(ee);
216 }
217 return updates ? 1 : 0;
218}
219
220static int
221_ecore_evas_sdl_render(Ecore_Evas *ee)
222{
223 int rend = 0;
224
225 rend = ecore_evas_render_prepare(ee);
226
227 if (ee->prop.avoid_damage) rend = _ecore_evas_render(ee);
228 else if ((ee->visible) ||
229 ((ee->should_be_visible) && (ee->prop.fullscreen)) ||
230 ((ee->should_be_visible) && (ee->prop.override)))
231 rend |= _ecore_evas_render(ee);
232 else
233 evas_norender(ee->evas);
234
235 if (ee->func.fn_post_render) ee->func.fn_post_render(ee);
236 return rend;
237}
238
239static Eina_Bool 206static Eina_Bool
240_ecore_evas_sdl_event(void *data EINA_UNUSED) 207_ecore_evas_sdl_event(void *data EINA_UNUSED)
241{ 208{
@@ -538,7 +505,6 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
538 ee->prop.sticky = EINA_FALSE; 505 ee->prop.sticky = EINA_FALSE;
539 ee->prop.window = 0; 506 ee->prop.window = 0;
540 ee->alpha = alpha; 507 ee->alpha = alpha;
541 ee->can_async_render = EINA_FALSE;
542 ee->prop.hwsurface = hwsurface; 508 ee->prop.hwsurface = hwsurface;
543 509
544 /* init evas here */ 510 /* init evas here */
@@ -550,6 +516,7 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
550 evas_output_viewport_set(ee->evas, 0, 0, w, h); 516 evas_output_viewport_set(ee->evas, 0, 0, w, h);
551 517
552 gl = !(rmethod == evas_render_method_lookup("buffer")); 518 gl = !(rmethod == evas_render_method_lookup("buffer"));
519 ee->can_async_render = gl ? EINA_FALSE : EINA_TRUE;
553 520
554 swd->w = SDL_CreateWindow(name, 521 swd->w = SDL_CreateWindow(name,
555 SDL_WINDOWPOS_UNDEFINED, 522 SDL_WINDOWPOS_UNDEFINED,
@@ -653,7 +620,6 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
653 620
654 SDL_ShowCursor(SDL_ENABLE); 621 SDL_ShowCursor(SDL_ENABLE);
655 622
656 ee->engine.func->fn_render = _ecore_evas_sdl_render;
657 _ecore_evas_register(ee); 623 _ecore_evas_register(ee);
658 624
659 _ecore_evas_focus_device_set(ee, NULL, EINA_TRUE); 625 _ecore_evas_focus_device_set(ee, NULL, EINA_TRUE);