From: raster Date: Fri, 27 Aug 2010 10:38:41 +0000 (+0000) Subject: fix un/resurf for dump. X-Git-Tag: submit/trunk/20120815.174732~2478 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73a8dcb63f1c6019dae6b5c03c385c0a9479d877;p=profile%2Fivi%2Fevas.git fix un/resurf for dump. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@51674 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/modules/engines/gl_x11/evas_x_main.c b/src/modules/engines/gl_x11/evas_x_main.c index 0b29f29..c937ea3 100644 --- a/src/modules/engines/gl_x11/evas_x_main.c +++ b/src/modules/engines/gl_x11/evas_x_main.c @@ -457,12 +457,15 @@ eng_window_use(Evas_GL_X11_Window *gw) _evas_gl_x11_window = gw; // EGL / GLES #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - if (eglMakeCurrent(gw->egl_disp, - gw->egl_surface[0], - gw->egl_surface[0], - gw->egl_context[0]) == EGL_FALSE) + if (gw->egl_surface[0] != EGL_NO_SURFACE) { - printf("Error: eglMakeCurrent() failed!\n"); + if (eglMakeCurrent(gw->egl_disp, + gw->egl_surface[0], + gw->egl_surface[0], + gw->egl_context[0]) == EGL_FALSE) + { + printf("Error: eglMakeCurrent() failed!\n"); + } } // GLX #else @@ -493,10 +496,10 @@ eng_window_unsurf(Evas_GL_X11_Window *gw) if (getenv("EVAS_GL_INFO")) printf("unsurf %p\n", gw); #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) + eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); if (gw->egl_surface[0] != EGL_NO_SURFACE) eglDestroySurface(gw->egl_disp, gw->egl_surface[0]); gw->egl_surface[0] = EGL_NO_SURFACE; - eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); #else if (gw->glxwin) { @@ -525,6 +528,13 @@ eng_window_resurf(Evas_GL_X11_Window *gw) printf("Error: error # was: 0x%x\n", eglGetError()); return; } + if (eglMakeCurrent(gw->egl_disp, + gw->egl_surface[0], + gw->egl_surface[0], + gw->egl_context[0]) == EGL_FALSE) + { + printf("Error: eglMakeCurrent() failed!\n"); + } #else #ifdef NEWGL if (gw->alpha)