This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch evas-sdl3-rewrite
in repository efl.
View the commit online.
commit 7c0fd8f28ad0b2e8aa9463e42511cff3f5a97764
Author: Swagtoy <[email protected]>
AuthorDate: Sun May 17 22:47:22 2026 -0400
gl_sdl: wire up engine again
Let's get it all wired up through meson again.
Signed-off-by: Swagtoy <[email protected]>
---
src/lib/ecore_evas/Ecore_Evas.h | 2 +-
src/lib/ecore_evas/ecore_evas.c | 10 ++++------
src/lib/ecore_sdl/ecore_sdl.c | 2 +-
src/lib/elementary/efl_ui_win.c | 2 +-
src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c | 13 ++++++-------
src/modules/ecore_evas/engines/sdl/meson.build | 5 +++++
src/modules/evas/engines/gl_sdl/evas_engine.h | 15 +++++++--------
src/modules/evas/engines/gl_sdl/meson.build | 16 ++++++++++++++++
src/modules/evas/engines/meson.build | 1 +
9 files changed, 42 insertions(+), 24 deletions(-)
diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index 1c1be7f6a1..f048fdfd1c 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -1977,7 +1977,7 @@ EAPI Ecore_Evas *ecore_evas_sdl_new(const char* name, int w, int h);
* @param noframe Set the noframe flag on the einfo.
* @return A new @c Ecore_Evas instance or @c NULL on failure
*/
-EAPI Ecore_Evas *ecore_evas_gl_sdl_new(const char* name, int w, int h, int fullscreen, int noframe);
+EAPI Ecore_Evas *ecore_evas_gl_sdl_new(const char* name, int w, int h);
EAPI Ecore_Evas *ecore_evas_software_wince_new(Ecore_WinCE_Window *parent,
int x,
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index f2f40857eb..386b1e12a1 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -851,10 +851,8 @@ _ecore_evas_constructor_opengl_sdl(int x EINA_UNUSED, int y EINA_UNUSED, int w,
char *name = NULL;
_ecore_evas_parse_extra_options_str(extra_options, "name=", &name);
- _ecore_evas_parse_extra_options_uint(extra_options, "fullscreen=", &fullscreen);
- _ecore_evas_parse_extra_options_uint(extra_options, "noframe=", &noframe);
- ee = ecore_evas_gl_sdl_new(name, w, h, fullscreen, noframe);
+ ee = ecore_evas_gl_sdl_new(name, w, h);
free(name);
return ee;
@@ -4401,17 +4399,17 @@ ecore_evas_sdl16_new(const char* name, int w, int h, int fullscreen,
}
EAPI Ecore_Evas *
-ecore_evas_gl_sdl_new(const char* name, int w, int h, int fullscreen, int noframe)
+ecore_evas_gl_sdl_new(const char* name, int w, int h)
{
Ecore_Evas *ee;
- Ecore_Evas *(*new)(const char *, int, int, int, int);
+ Ecore_Evas *(*new)(const char *, int, int);
Eina_Module *m = _ecore_evas_engine_load("sdl");
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
new = eina_module_symbol_get(m, "ecore_evas_gl_sdl_new_internal");
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
- ee = new(name, w, h, fullscreen, noframe);
+ ee = new(name, w, h);
if (!_ecore_evas_cursors_init(ee))
{
ecore_evas_free(ee);
diff --git a/src/lib/ecore_sdl/ecore_sdl.c b/src/lib/ecore_sdl/ecore_sdl.c
index b55501c6c6..25ee138855 100644
--- a/src/lib/ecore_sdl/ecore_sdl.c
+++ b/src/lib/ecore_sdl/ecore_sdl.c
@@ -393,7 +393,7 @@ ecore_sdl_feed_events(void)
{
timestamp = (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff);
#define EVCASE(sdl_event, func) \
- case sdl_event: ecore_sdl_event_ ## func(&event, timestamp); return;
+ case sdl_event: ecore_sdl_event_ ## func(&event, timestamp); break;
switch(event.type)
{
EVCASE(SDL_EVENT_MOUSE_MOTION, mouse_motion);
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 1dff3d92a0..6e9f2be529 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5540,7 +5540,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
else if (!strcmp(enginelist[i], ELM_SOFTWARE_SDL))
tmp_sd.ee = ecore_evas_sdl_new(NULL, 0, 0);
else if (!strcmp(enginelist[i], ELM_OPENGL_SDL))
- tmp_sd.ee = ecore_evas_gl_sdl_new(NULL, 1, 1, 0, 0);
+ tmp_sd.ee = ecore_evas_gl_sdl_new(NULL, 1, 1);
else if (!strcmp(enginelist[i], ELM_OPENGL_COCOA))
tmp_sd.ee = ecore_evas_cocoa_new(NULL, 1, 1, 0, 0);
else if (!strcmp(enginelist[i], ELM_SOFTWARE_FB))
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 c62ef3f399..42c30f4caa 100644
--- a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
+++ b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
@@ -381,11 +381,10 @@ static Ecore_Evas_Engine_Func _ecore_sdl_engine_func =
};
static Ecore_Evas*
-_ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h)
+_ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, Eina_Bool gl)
{
Ecore_Evas_SDL_Data *edata;
Ecore_Evas *ee;
- Eina_Bool gl = EINA_FALSE;
// XXX
if (!name)
@@ -428,14 +427,14 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h)
ee->prop.window = 0;
// 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;
+ if (gl)
+ ee->func.fn_post_render = _ecore_evas_sdl_post_render;
/* init evas here */
if (!ecore_evas_evas_new(ee, w, h))
{
ERR("Can not create Canvas.");
goto on_error;
}
- gl = !(rmethod == evas_render_method_lookup("software_sdl"));
evas_output_method_set(ee->evas, rmethod);
ee->can_async_render = gl ? EINA_FALSE : EINA_TRUE;
@@ -488,13 +487,13 @@ ecore_evas_sdl_new_internal(const char* name, int w, int h)
rmethod = evas_render_method_lookup("software_sdl");
if (!rmethod) return NULL;
- ee = _ecore_evas_internal_sdl_new(rmethod, name, w, h);
+ ee = _ecore_evas_internal_sdl_new(rmethod, name, w, h, EINA_FALSE);
return ee;
}
#ifdef BUILD_ECORE_EVAS_OPENGL_SDL
EMODAPI Ecore_Evas *
-ecore_evas_gl_sdl_new_internal(const char* name, int w, int h, int fullscreen, int noframe)
+ecore_evas_gl_sdl_new_internal(const char* name, int w, int h)
{
Ecore_Evas *ee;
int rmethod;
@@ -502,7 +501,7 @@ ecore_evas_gl_sdl_new_internal(const char* name, int w, int h, int fullscreen, i
rmethod = evas_render_method_lookup("gl_sdl");
if (!rmethod) return NULL;
- ee = _ecore_evas_internal_sdl_new(rmethod, name, w, h, fullscreen, 0, noframe, 0);
+ ee = _ecore_evas_internal_sdl_new(rmethod, name, w, h, EINA_TRUE);
if (ee) ee->driver = "gl_sdl";
return ee;
}
diff --git a/src/modules/ecore_evas/engines/sdl/meson.build b/src/modules/ecore_evas/engines/sdl/meson.build
index b00d2ab949..efed26d814 100644
--- a/src/modules/ecore_evas/engines/sdl/meson.build
+++ b/src/modules/ecore_evas/engines/sdl/meson.build
@@ -3,6 +3,11 @@ engine_deps = [ecore_sdl, ecore_input, ecore, dependency('sdl3')]
engine_deps += [engine_software_sdl]
+if get_option('opengl') != 'none'
+ config_h.set('BUILD_ECORE_EVAS_OPENGL_SDL', '1')
+ engine_deps += [engine_gl_sdl]
+endif
+
shared_module(mod_full_name, engine_src,
c_args : package_c_args,
include_directories : config_dir + [engine_include_dir],
diff --git a/src/modules/evas/engines/gl_sdl/evas_engine.h b/src/modules/evas/engines/gl_sdl/evas_engine.h
index e8524341bb..968c1e7e08 100644
--- a/src/modules/evas/engines/gl_sdl/evas_engine.h
+++ b/src/modules/evas/engines/gl_sdl/evas_engine.h
@@ -4,23 +4,22 @@
#define _EVAS_ENGINE_SDL_H
#include "config.h"
-#include <SDL2/SDL.h>
+#include "evas_common_private.h"
+#include "evas_private.h"
+#include "Evas.h"
+#include "Evas_Engine_GL_SDL.h"
+#include <SDL3/SDL.h>
#ifdef GL_GLES
-# include <SDL2/SDL_opengles.h>
+# include <SDL3/SDL_opengles.h>
# ifdef HAVE_SDL_FLAG_OPENGLES
# define EVAS_SDL_GL_FLAG SDL_OPENGLES
# else
# define EVAS_SDL_GL_FLAG SDL_OPENGL /* This probably won't work? */
# endif
#else
-# include <SDL2/SDL_opengl.h>
+# include <SDL3/SDL_opengl.h>
# define EVAS_SDL_GL_FLAG SDL_OPENGL
#endif
-#include "evas_common_private.h"
-#include "evas_private.h"
-#include "evas_gl_common.h"
-#include "Evas.h"
-#include "Evas_Engine_GL_SDL.h"
#include "../gl_generic/Evas_Engine_GL_Generic.h"
diff --git a/src/modules/evas/engines/gl_sdl/meson.build b/src/modules/evas/engines/gl_sdl/meson.build
new file mode 100644
index 0000000000..7b8f464d00
--- /dev/null
+++ b/src/modules/evas/engines/gl_sdl/meson.build
@@ -0,0 +1,16 @@
+engine_src = files([
+ 'evas_engine.c',
+ 'evas_engine.h',
+ 'Evas_Engine_GL_SDL.h',
+])
+
+engine_deps += [dependency('sdl3')]
+
+shared_module(mod_full_name, engine_src,
+ include_directories : config_dir + [engine_include_dir],
+ dependencies : engine_deps,
+ install : true,
+ install_dir : mod_install_dir,
+ name_suffix : sys_mod_extension
+)
+module_files += join_paths(mod_install_dir, 'lib'+mod_full_name + '.' + sys_mod_extension)
diff --git a/src/modules/evas/engines/meson.build b/src/modules/evas/engines/meson.build
index 262a149f4f..a5d979c8cb 100644
--- a/src/modules/evas/engines/meson.build
+++ b/src/modules/evas/engines/meson.build
@@ -31,6 +31,7 @@ else
if get_option('opengl') == 'full'
engines += [['gl_cocoa', ['cocoa']]]
+ engines += [['gl_sdl', ['sdl']]]
have_gl_engine = true
endif
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.