cedric pushed a commit to branch efl-1.11.

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

commit f294fdc3a1d0c648353eae2185ca2c53e4630949
Author: Cedric BAIL <[email protected]>
Date:   Thu Oct 9 12:20:53 2014 +0200

    evas: GL_X11 context need to always be with alpha or it will fail to change.
    
    @fix
---
 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, 6 insertions(+), 17 deletions(-)

diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index 19baaff..799c215 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -994,7 +994,6 @@ 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)
@@ -1059,11 +1058,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.destination_alpha != eng_get_ob(re)->alpha))
+                 (info->info.depth != eng_get_ob(re)->depth))
                {
                   Outbuf *ob;
 
+                  eng_get_ob(re)->gl_context->references++;
                   eng_window_free(eng_get_ob(re));
                   re->generic.software.ob = NULL;
                   gl_wins--;
@@ -1077,7 +1076,6 @@ 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 4ea9645..f8b4136 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 alpha, int rot,
+                       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 e78a644..94e32be 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -34,7 +34,6 @@ 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)
 {
@@ -61,7 +60,7 @@ eng_window_new(Evas_Engine_Info_GL_X11 *info,
    gw->visual = vis;
    gw->colormap = cmap;
    gw->depth = depth;
-   gw->alpha = alpha;
+   gw->alpha = 1;
    gw->w = w;
    gw->h = h;
    gw->rot = rot;
@@ -108,16 +107,8 @@ eng_window_new(Evas_Engine_Info_GL_X11 *info,
    config_attrs[n++] = 1;
 // FIXME: end n900 breakage
 # endif
-   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_ALPHA_SIZE;
+   config_attrs[n++] = 1;
    config_attrs[n++] = EGL_DEPTH_SIZE;
    config_attrs[n++] = 0;
    config_attrs[n++] = EGL_STENCIL_SIZE;

-- 


Reply via email to