This is an automated email from the git hooks/post-receive script.

git pushed a commit to reference refs/pull/124/head
in repository efl.

View the commit online.

commit d5b98adca6d1e332f90ae5458821a4e7437e4da4
Author: Swagtoy <[email protected]>
AuthorDate: Mon May 11 19:36:11 2026 -0400

    ecore_evas_sdl: move SDL surface blit to ee fn_post_render
    
    Signed-off-by: Swagtoy <[email protected]>
---
 .../ecore_evas/engines/sdl/ecore_evas_sdl.c        | 26 ++++++++++++++--------
 1 file changed, 17 insertions(+), 9 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 8059efb9bf..cb4db6ca03 100644
--- a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
+++ b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
@@ -130,21 +130,26 @@ _ecore_evas_sdl_event_video_expose(void *data EINA_UNUSED, int type EINA_UNUSED,
    return ECORE_CALLBACK_PASS_ON;
 }
 
+static void
+_ecore_evas_sdl_post_render(Ecore_Evas *ee)
+{
+   Evas_Engine_Info_Software_SDL *info = (Evas_Engine_Info_Software_SDL *) evas_engine_info_get(ee->evas);
+   Ecore_Evas_SDL_Switch_Data *swd = (Ecore_Evas_SDL_Switch_Data*) (ee + 1);
+   // XXX: this is not sufficient at all
+   SDL_Surface *surface = SDL_GetWindowSurface(swd->w);
+   if (!SDL_BlitSurface(info->surface, NULL, surface, NULL))
+     ERR("Couldn't blit surface: %s", SDL_GetError());
+   if (!SDL_UpdateWindowSurface(swd->w))
+     ERR("Couldn't update window surface: %s", SDL_GetError());
+
+}
+
 static Eina_Bool
 _ecore_evas_sdl_event(void *data EINA_UNUSED)
 {
-   // RENDERING...
    Ecore_Evas *ee = data;
-   Evas_Engine_Info_Software_SDL *info = (Evas_Engine_Info_Software_SDL *) evas_engine_info_get(ee->evas);
-   Ecore_Evas_SDL_Switch_Data *swd = (Ecore_Evas_SDL_Switch_Data*) (ee + 1);
    ecore_sdl_feed_events();
 
-   // XXX: this is not sufficient at all
-   SDL_Surface *surface = SDL_GetWindowSurface(swd->w);
-   SDL_BlitSurface(info->surface, NULL, surface, NULL);
-   if (!SDL_UpdateWindowSurface(swd->w))
-     printf("Couldn't update window surface: %s\n", SDL_GetError());
-
    return ECORE_CALLBACK_RENEW;
 }
 
@@ -413,6 +418,9 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
    ee->prop.window     = 0;
    ee->alpha           = alpha;
    ee->prop.hwsurface  = hwsurface;
+   // TODO: probably make this only occur for the sw renderer, when GL
+   // is later implemented
+   ee->func.fn_post_render = _ecore_evas_sdl_post_render;
    /* init evas here */
    if (!ecore_evas_evas_new(ee, w, h))
      {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to