backport dest alpha fix.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 5 Sep 2012 10:11:59 +0000 (10:11 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 5 Sep 2012 10:11:59 +0000 (10:11 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/branches/evas-1.7@76189 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
NEWS
src/modules/engines/gl_x11/evas_x_main.c

index aee85b6..20acc24 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * Wayland Egl Engine: Add support for Multi-Sample Anti-Aliasing and GL Direct Images.
                               Add support for using native image binding.
                               Add support for setting GL surface capabilities.
+
+2012-08-30  Carsten Haitzler (The Rasterman)
+
+        1.7.0 release
+        
+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/NEWS b/NEWS
index 4455de4..e06a30d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,12 @@
+Evas 1.7.1
+
+Changes since Evas 1.7.0:
+-------------------------
+
+Fixes:
+
+   * Fix EGL/GLES dest alpha rendering bug (no rendering).
+   
 Evas 1.7.0
 
 Changes since Evas 1.2.0:
index c7ed1c0..6959774 100644 (file)
@@ -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);