diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h index 8ecaa8fa0b..1910a463da 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_common.h +++ b/src/modules/evas/engines/gl_common/evas_gl_common.h @@ -248,6 +248,11 @@ struct _Evas_GL_Shared Eina_Hash *native_pm_hash; Eina_Hash *native_tex_hash; +#ifdef GL_GLES + // FIXME: hack. + void *eglctxt; +#endif + Evas_GL_Program shader[SHADER_LAST]; int references; @@ -350,8 +355,11 @@ struct _Evas_Engine_GL_Context /* If this is set: Force drawing with a particular filter */ GLuint filter_prog; +#ifdef GL_GLES // FIXME: hack. expose egl display to gl core for egl image sec extn. void *egldisp; + void *eglctxt; +#endif }; struct _Evas_GL_Texture_Pool diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index a9dbc337e9..ba75a43c06 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -376,12 +376,23 @@ _evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc) m = -1; } - if ((!gc->change.size) || - ((gc->shared->w == w) && (gc->shared->h == h) && - (gc->shared->rot == rot) && (gc->shared->foc == gc->foc) && - (gc->shared->mflip == m))) - return; - +#ifdef GL_GLES + if (gc->shared->eglctxt == gc->eglctxt) +#endif + { + if ((!gc->change.size) || + ( + (gc->shared->w == w) && (gc->shared->h == h) && + (gc->shared->rot == rot) && (gc->shared->foc == gc->foc) && + (gc->shared->mflip == m) + ) + ) + return; + } +#ifdef GL_GLES + gc->shared->eglctxt = gc->eglctxt; +#endif + gc->shared->w = w; gc->shared->h = h; gc->shared->rot = rot; diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c b/src/modules/evas/engines/gl_x11/evas_x_main.c index e3dc2d7343..e024e77a34 100644 --- a/src/modules/evas/engines/gl_x11/evas_x_main.c +++ b/src/modules/evas/engines/gl_x11/evas_x_main.c @@ -406,6 +406,7 @@ eng_window_new(Display *disp, } #ifdef GL_GLES gw->gl_context->egldisp = gw->egl_disp; + gw->gl_context->eglctxt = gw->egl_context[0]; #endif eng_window_use(gw); evas_gl_common_context_resize(gw->gl_context, w, h, rot);