From 13f9bd17f0b1e325208f0200a4b4b7f0acf168f1 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Thu, 12 Jan 2012 09:10:27 +0000 Subject: [PATCH] Elementary: Added Wayland_Egl backend support. Modified elm_win to use generic wayland_resize function (for ecore_evas). SVN revision: 67134 --- src/bin/config.c | 1 + src/lib/elm_config.c | 3 +++ src/lib/elm_priv.h | 1 + src/lib/elm_win.c | 12 ++++++++++-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/bin/config.c b/src/bin/config.c index 8c16ee3..c32fe1b 100644 --- a/src/bin/config.c +++ b/src/bin/config.c @@ -2714,6 +2714,7 @@ _elm_engine_supported(const char *engine) "opengl_cocoa", "psl1ght", "wayland_shm", + "wayland_egl", NULL }; diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c index 36c4664..ba922bc 100644 --- a/src/lib/elm_config.c +++ b/src/lib/elm_config.c @@ -36,6 +36,7 @@ const char *_elm_engines[] = { "opengl_cocoa", "psl1ght", "wayland_shm", + "wayland_egl", NULL }; @@ -1202,6 +1203,8 @@ _env_get(void) eina_stringshare_replace(&_elm_config->engine, ELM_EWS); else if ((!strcasecmp(s, "wayland_shm"))) eina_stringshare_replace(&_elm_config->engine, ELM_WAYLAND_SHM); + else if ((!strcasecmp(s, "wayland_egl"))) + eina_stringshare_replace(&_elm_config->engine, ELM_WAYLAND_EGL); } s = getenv("ELM_VSYNC"); diff --git a/src/lib/elm_priv.h b/src/lib/elm_priv.h index 6b0f9bf..dfc2577 100644 --- a/src/lib/elm_priv.h +++ b/src/lib/elm_priv.h @@ -90,6 +90,7 @@ extern const char *_elm_engines[]; #define ELM_OPENGL_COCOA (_elm_engines[14]) #define ELM_SOFTWARE_PSL1GHT (_elm_engines[15]) #define ELM_WAYLAND_SHM (_elm_engines[16]) +#define ELM_WAYLAND_EGL (_elm_engines[17]) #define ELM_FONT_TOKEN_STYLE ":style=" diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 4171b1a..588c1af 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -1,4 +1,4 @@ - #include +#include #include "elm_priv.h" typedef struct _Elm_Win Elm_Win; @@ -1380,8 +1380,9 @@ _elm_win_frame_cb_resize_start(void *data, Evas_Object *obj __UNUSED__, const ch else win->resize_location = 0; + /* FIXME: Change to more generic wayland resize function */ if (win->resize_location > 0) - ecore_evas_wayland_shm_resize(win->ee, win->resize_location); + ecore_evas_wayland_resize(win->ee, win->resize_location); } static void @@ -1665,6 +1666,13 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type) _elm_win_frame_add(win, "default"); } + else if (ENGINE_COMPARE(ELM_WAYLAND_EGL)) + { + win->ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 1, 1, 0); + win->evas = ecore_evas_get(win->ee); + + _elm_win_frame_add(win, "default"); + } else if (!strncmp(_elm_config->engine, "shot:", 5)) { win->ee = ecore_evas_buffer_new(1, 1); -- 2.7.4