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;
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) { \
#include "evas_engine.h"
+# define SET_RESTORE_CONTEXT() do { if (glsym_evas_gl_context_restore_set) glsym_evas_gl_context_restore_set(EINA_TRUE); } while(0)
+
/* local function prototypes */
/* local variables */
if (context == EGL_NO_CONTEXT) context = gw->egl_context[0];
+ SET_RESTORE_CONTEXT();
if (eglMakeCurrent(gw->egl_disp, gw->egl_surface[0],
gw->egl_surface[0], gw->egl_context[0]) == EGL_FALSE)
{
glsym_evas_gl_common_context_free(gw->gl_context);
}
+ SET_RESTORE_CONTEXT();
eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE,
EGL_NO_SURFACE, EGL_NO_CONTEXT);
{
if (gw->egl_surface[0] != EGL_NO_SURFACE)
{
+ SET_RESTORE_CONTEXT();
if (eglMakeCurrent(gw->egl_disp, gw->egl_surface[0],
gw->egl_surface[0],
gw->egl_context[0]) == EGL_FALSE)
if (_evas_gl_wl_window == gw)
{
+ SET_RESTORE_CONTEXT();
eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE,
EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (gw->egl_surface[0] != EGL_NO_SURFACE)
return;
}
+ SET_RESTORE_CONTEXT();
if (eglMakeCurrent(gw->egl_disp, gw->egl_surface[0], gw->egl_surface[0],
gw->egl_context[0]) == EGL_FALSE)
ERR("eglMakeCurrent() failed!");
void
eng_gl_context_use(Context_3D *ctx)
{
+ SET_RESTORE_CONTEXT();
if (eglMakeCurrent(ctx->display, ctx->surface,
ctx->surface, ctx->context) == EGL_FALSE)
{