raster pushed a commit to branch efl-1.11.

http://git.enlightenment.org/core/efl.git/commit/?id=9a383f4d7498329742e38c65423568aa6d9150bd

commit 9a383f4d7498329742e38c65423568aa6d9150bd
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Thu Oct 16 22:36:42 2014 +0900

    revert this gl x11 alpha "fix". this is worse than before
    
    ok - so fix an alpha window bugh.. only to kill ALL nvidia driver
    support. no - tgis is WROSE by a massive margin. massive. pick the
    lesser of evils and that is alpha windows broken...
    
    this should bever have gone into any release.
    
    @fix
    
    Revert "evas: GL_X11 context need to always be with alpha or it will fail 
to change."
    
    This reverts commit f294fdc3a1d0c648353eae2185ca2c53e4630949.
---
 src/modules/evas/engines/gl_x11/evas_engine.c |  6 ++++--
 src/modules/evas/engines/gl_x11/evas_engine.h |  2 +-
 src/modules/evas/engines/gl_x11/evas_x_main.c | 15 ++++++++++++---
 3 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index 799c215..19baaff 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -994,6 +994,7 @@ eng_setup(Evas *eo_e, void *in)
                             info->info.depth,
                             e->output.w, e->output.h,
                             info->indirect,
+                            info->info.destination_alpha,
                             info->info.rotation,
                             swap_mode);
         if (!ob)
@@ -1058,11 +1059,11 @@ eng_setup(Evas *eo_e, void *in)
                  (info->info.screen != eng_get_ob(re)->screen) ||
                  (info->info.visual != eng_get_ob(re)->visual) ||
                  (info->info.colormap != eng_get_ob(re)->colormap) ||
-                 (info->info.depth != eng_get_ob(re)->depth))
+                 (info->info.depth != eng_get_ob(re)->depth) ||
+                 (info->info.destination_alpha != eng_get_ob(re)->alpha))
                {
                   Outbuf *ob;
 
-                  eng_get_ob(re)->gl_context->references++;
                   eng_window_free(eng_get_ob(re));
                   re->generic.software.ob = NULL;
                   gl_wins--;
@@ -1076,6 +1077,7 @@ eng_setup(Evas *eo_e, void *in)
                                       info->info.depth,
                                       e->output.w, e->output.h,
                                       info->indirect,
+                                      info->info.destination_alpha,
                                       info->info.rotation,
                                       swap_mode);
 
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.h 
b/src/modules/evas/engines/gl_x11/evas_engine.h
index f8b4136..4ea9645 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.h
+++ b/src/modules/evas/engines/gl_x11/evas_engine.h
@@ -160,7 +160,7 @@ Outbuf *eng_window_new(Evas_Engine_Info_GL_X11 *info, Evas 
*e,
                        Display *disp, Window win, int screen,
                        Visual *vis, Colormap cmap,
                        int depth, int w, int h, int indirect,
-                       int rot,
+                       int alpha, int rot,
                        Render_Engine_Swap_Mode swap_mode);
 void      eng_window_free(Outbuf *gw);
 void      eng_window_use(Outbuf *gw);
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 94e32be..e78a644 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -34,6 +34,7 @@ eng_window_new(Evas_Engine_Info_GL_X11 *info,
                int      w,
                int      h,
                int      indirect EINA_UNUSED,
+               int      alpha,
                int      rot,
                Render_Engine_Swap_Mode swap_mode)
 {
@@ -60,7 +61,7 @@ eng_window_new(Evas_Engine_Info_GL_X11 *info,
    gw->visual = vis;
    gw->colormap = cmap;
    gw->depth = depth;
-   gw->alpha = 1;
+   gw->alpha = alpha;
    gw->w = w;
    gw->h = h;
    gw->rot = rot;
@@ -107,8 +108,16 @@ eng_window_new(Evas_Engine_Info_GL_X11 *info,
    config_attrs[n++] = 1;
 // FIXME: end n900 breakage
 # endif
-   config_attrs[n++] = EGL_ALPHA_SIZE;
-   config_attrs[n++] = 1;
+   if (gw->alpha)
+     {
+        config_attrs[n++] = EGL_ALPHA_SIZE;
+        config_attrs[n++] = 1;
+     }
+   else
+     {
+        config_attrs[n++] = EGL_ALPHA_SIZE;
+        config_attrs[n++] = 0;
+     }
    config_attrs[n++] = EGL_DEPTH_SIZE;
    config_attrs[n++] = 0;
    config_attrs[n++] = EGL_STENCIL_SIZE;

-- 


Reply via email to