Revert "evas: GL_X11 context need to always be with alpha or it will fail to change."

Need to also revert this in master. Cedric seems busy with other things and this
should not end up in 1.12  alpha1

This reverts commit 4ea75113ca.
This commit is contained in:
Stefan Schmidt 2014-10-21 09:22:49 +02:00
parent a3caed8012
commit a7ef5bd7da
3 changed files with 17 additions and 7 deletions

View File

@ -1360,6 +1360,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)
@ -1425,11 +1426,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--;
@ -1443,6 +1444,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);
@ -1451,7 +1453,6 @@ eng_setup(Evas *eo_e, void *in)
{
evas_render_engine_software_generic_update(&re->generic.software, ob,
e->output.w, e->output.h);
eng_get_ob(re)->gl_context->references--;
gl_wins++;
}

View File

@ -158,7 +158,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);

View File

@ -109,6 +109,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)
{
@ -139,7 +140,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;
@ -172,8 +173,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;