summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWonsik Jung <sidein@samsung.com>2015-05-28 19:55:17 +0900
committerGwanglim Lee <gl77.lee@samsung.com>2015-05-28 05:55:28 -0700
commitf4ab26dc570e6f4b7e8fec965369fba5b67ff488 (patch)
tree9aad9a61f12b9f95c5c81ac6b9074678c9089dd9
parentd103f235c3daaaefcbd11ba47614cdad1954d3e8 (diff)
downloadefl-f4ab26dc570e6f4b7e8fec965369fba5b67ff488.tar.gz
Fix to the bug of create egl window surface
@fix - When widow surface is created for Evas GL capa testing, invalid window id is used. It is side effect of previoud patch Change-Id: I7af2c43a87a317f4c90278a0b38e1ab7e46cd24c
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c
index b701c96f4b..0bd809d159 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -265,7 +265,7 @@ evgl_eng_evas_surface_get(void *data)
static void *
evgl_eng_native_window_create(void *data)
{
- Evgl_wl_Surface* surface = NULL;
+ Evgl_wl_Surface* surface;
Render_Engine *re;
Outbuf *ob;
@@ -274,7 +274,7 @@ evgl_eng_native_window_create(void *data)
if (!(surface = calloc(1, sizeof(Evgl_wl_Surface))))
return NULL;
- surface->wl_surf = wl_compositor_create_surface(ob->compositor);
+ surface->wl_surf = wl_compositor_create_surface(ob->compositor);
if (!surface->wl_surf)
{
ERR("Could not create wl_surface: %m");
@@ -289,10 +289,10 @@ evgl_eng_native_window_create(void *data)
return (void *)surface;
}
-static int
+static int
evgl_eng_native_window_destroy(void *data, void *win)
{
- Evgl_wl_Surface* surface = NULL;
+ Evgl_wl_Surface* surface;
if (!win) return 0;
surface = (Evgl_wl_Surface*)win;
@@ -311,12 +311,15 @@ evgl_eng_window_surface_create(void *data, void *win)
Render_Engine *re;
Outbuf *ob;
EGLSurface surface = EGL_NO_SURFACE;
+ Evgl_wl_Surface* evgl_surface;
if (!(re = (Render_Engine *)data)) return NULL;
if (!(ob = eng_get_ob(re))) return NULL;
+ if (!(evgl_surface = (Evgl_wl_Surface *)win)) return NULL;
+ if (!(evgl_surface->egl_win)) return NULL;
- surface = eglCreateWindowSurface(ob->egl_disp, ob->egl_config,
- (EGLNativeWindowType)win, NULL);
+ surface = eglCreateWindowSurface(ob->egl_disp, ob->egl_config,
+ (EGLNativeWindowType)evgl_surface->egl_win, NULL);
if (!surface)
{
ERR("Could not create egl window surface: %#x", eglGetError());
@@ -326,7 +329,7 @@ evgl_eng_window_surface_create(void *data, void *win)
return (void *)surface;
}
-static int
+static int
evgl_eng_window_surface_destroy(void *data, void *surface)
{
Render_Engine *re;