diff --git a/legacy/evas/ChangeLog b/legacy/evas/ChangeLog index b1681e12a0..5583bb20c3 100644 --- a/legacy/evas/ChangeLog +++ b/legacy/evas/ChangeLog @@ -1024,3 +1024,8 @@ 2012-09-05 ChunEon Park (Hermet) * Added EVAS_CALLBACK_IMAGE_RESIZE. Now user have a notify when image data size of the image object is changed. + +2012-09-05 Carsten Haitzler (The Rasterman) + + * Fix EGL/GLES bug when setting up rgba dest alpha windows where they + cease to be rendered to. use a shared context and it works. diff --git a/legacy/evas/NEWS b/legacy/evas/NEWS index fb0bc688d2..871a260f86 100644 --- a/legacy/evas/NEWS +++ b/legacy/evas/NEWS @@ -13,7 +13,9 @@ Improvements: * Function to rotate an evas map with a quaternion: evas_map_util_quat_rotate(). Fixes: + * Fix segmentation fault with the esvg loader. + * Fix EGL/GLES dest alpha rendering bug (no rendering). Evas 1.7.0 diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c b/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c index c7ed1c0c59..6959774d23 100644 --- a/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c +++ b/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c @@ -4,7 +4,6 @@ static Evas_GL_X11_Window *_evas_gl_x11_window = NULL; #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) static EGLContext context = EGL_NO_CONTEXT; -static EGLContext rgba_context = EGL_NO_CONTEXT; #else // FIXME: this will only work for 1 display connection (glx land can have > 1) static GLXContext context = 0; @@ -197,26 +196,17 @@ eng_window_new(Display *disp, eng_window_free(gw); return NULL; } - if (gw->alpha) - { - if (rgba_context == EGL_NO_CONTEXT) - rgba_context = eglCreateContext(gw->egl_disp, gw->egl_config, NULL, - context_attrs); - gw->egl_context[0] = rgba_context; - } - else - { - if (context == EGL_NO_CONTEXT) - context = eglCreateContext(gw->egl_disp, gw->egl_config, NULL, - context_attrs); - gw->egl_context[0] = context; - } + + gw->egl_context[0] = eglCreateContext + (gw->egl_disp, gw->egl_config, context, context_attrs); if (gw->egl_context[0] == EGL_NO_CONTEXT) { ERR("eglCreateContext() fail. code=%#x", eglGetError()); eng_window_free(gw); return NULL; } + if (context == EGL_NO_CONTEXT) context = gw->egl_context[0]; + if (eglMakeCurrent(gw->egl_disp, gw->egl_surface[0], gw->egl_surface[0], @@ -560,13 +550,13 @@ eng_window_free(Evas_GL_X11_Window *gw) 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]); + if (gw->egl_context[0] != context) + eglDestroyContext(gw->egl_disp, gw->egl_context[0]); if (ref == 0) { if (context) eglDestroyContext(gw->egl_disp, context); - if (rgba_context) eglDestroyContext(gw->egl_disp, rgba_context); eglTerminate(gw->egl_disp); context = EGL_NO_CONTEXT; - rgba_context = EGL_NO_CONTEXT; } #else if (gw->glxwin) glXDestroyWindow(gw->disp, gw->glxwin);