From db20d2aeabc927d4bc1a53c2d697e450dd1f3a85 Mon Sep 17 00:00:00 2001 From: "Sung W. Park" Date: Thu, 21 Apr 2011 09:23:42 +0000 Subject: [PATCH] From: "Sung W. Park" (part of the evas-gl work) the patch basically checks to see if the current context is evas' gl context and if it is, it'll call evas_gl_common_context_flush(). I think this is the proper SVN revision: 58786 --- .../src/modules/engines/gl_x11/evas_engine.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c index 83dfd19dc3..8fb7adbb51 100644 --- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c +++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c @@ -2457,6 +2457,24 @@ eng_gl_make_current(void *data, void *surface, void *context) sfc = (Render_Engine_GL_Surface*)surface; ctx = (Render_Engine_GL_Context*)context; + if (re->win) + { +#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + if ((eglGetCurrentContext() == re->win->egl_context[0]) || + (eglGetCurrentSurface(EGL_READ) == re->win->egl_surface[0]) || + (eglGetCurrentSurface(EGL_DRAW) == re->win->egl_surface[0])) + { + evas_gl_common_context_use(re->win->gl_context); + evas_gl_common_context_flush(re->win->gl_context); + } +#else + if (glXGetCurrentContext() == re->win->context) + { + evas_gl_common_context_use(re->win->gl_context); + evas_gl_common_context_flush(re->win->gl_context); + } +#endif + } if ((!sfc) || (!ctx)) {