From 4e43d2c3a82f6471ca1f3e4028f2115d47f91cea Mon Sep 17 00:00:00 2001 From: "Prudhvi Raj, Vasireddi" Date: Fri, 18 Mar 2016 12:13:22 +0900 Subject: [PATCH] Evas GL: Applied 'Fix linking to 'context_restore_set'' patch for wayland_egl engine Change-Id: I5bfc2ad6a21110c32470021c06df8f098425e08d --- src/modules/evas/engines/wayland_egl/evas_engine.c | 2 -- src/modules/evas/engines/wayland_egl/evas_engine.h | 1 - src/modules/evas/engines/wayland_egl/evas_wl_main.c | 13 ++++++++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index 92a1f14..bb142b9 100755 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@ -77,7 +77,6 @@ Evas_GL_Preload_Render_Call glsym_evas_gl_preload_render_relax = NULL; glsym_func_void glsym_evas_gl_common_error_set = NULL; glsym_func_int glsym_evas_gl_common_error_get = NULL; glsym_func_void_ptr glsym_evas_gl_common_current_context_get = NULL; -void (*glsym_evas_gl_context_restore_set) (Eina_Bool enable) = NULL; _eng_fn (*glsym_eglGetProcAddress) (const char *a) = NULL; void *(*glsym_eglCreateImage) (EGLDisplay a, EGLContext b, EGLenum c, EGLClientBuffer d, const int *e) = NULL; @@ -150,7 +149,6 @@ gl_symbols(void) LINK2GENERIC(evas_gl_common_error_get); LINK2GENERIC(evas_gl_common_error_set); LINK2GENERIC(evas_gl_common_current_context_get); - LINK2GENERIC(evas_gl_context_restore_set); #define FINDSYM(dst, sym, typ) \ if (glsym_eglGetProcAddress) { \ diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.h b/src/modules/evas/engines/wayland_egl/evas_engine.h index 29c479b..e9f4da0 100755 --- a/src/modules/evas/engines/wayland_egl/evas_engine.h +++ b/src/modules/evas/engines/wayland_egl/evas_engine.h @@ -153,6 +153,5 @@ _re_wincheck(Outbuf *ob) return 0; } -extern void (*glsym_evas_gl_context_restore_set) (Eina_Bool enable); #endif diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c index 7011389..ae6bf47 100644 --- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c +++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c @@ -1,8 +1,11 @@ #include "evas_engine.h" +#include -# define SET_RESTORE_CONTEXT() do { if (glsym_evas_gl_context_restore_set) glsym_evas_gl_context_restore_set(EINA_TRUE); } while(0) +# define SET_RESTORE_CONTEXT() do { if (glsym_evas_gl_common_context_restore_set) glsym_evas_gl_common_context_restore_set(EINA_TRUE); } while(0) /* local function prototypes */ +typedef void (*glsym_func_void) (); +glsym_func_void glsym_evas_gl_common_context_restore_set = NULL; /* local variables */ static Outbuf *_evas_gl_wl_window = NULL; @@ -25,6 +28,14 @@ eng_window_new(Evas *evas, Evas_Engine_Info_Wayland_Egl *einfo, int w, int h, Re /* try to allocate space for our window */ if (!(gw = calloc(1, sizeof(Outbuf)))) return NULL; +#define LINK2GENERIC(sym) \ + do { \ + if (!glsym_##sym) {\ + glsym_##sym = dlsym(RTLD_DEFAULT, #sym); \ + if (!glsym_##sym) ERR("Could not find function '%s'", #sym); }\ + } while(0) + + LINK2GENERIC(evas_gl_common_context_restore_set); win_count++; gw->info = einfo; -- 2.7.4