summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-08-27 11:34:10 +0200
committerwm4 <wm4@nowhere>2020-08-27 11:55:20 +0200
commit7fb972fd3997bfa389caa7c1eb899ea4b8444083 (patch)
treeb8cbbbcd6777f041bd7dc471c0a394cf843c5156 /video
parentb5b83a1ed5236346754b75d1fb376dc5c683b7bd (diff)
downloadmpv-7fb972fd3997bfa389caa7c1eb899ea4b8444083.tar.bz2
mpv-7fb972fd3997bfa389caa7c1eb899ea4b8444083.tar.xz
vo_gpu: EGL: fix transparency on X11/EGL/Mesa
Transparent windows on X11/EGL/native Mesa GL didn't work for various reasons. From what I remember, the current code did work with nvidia at least. Mesa has made attempts to fix this, but they never really made it in. But it turns out you can make EGL/Mesa list the EGLConfigs that use X11 RGBA visuals, and context_x11egl.c contains code that explicitly selects them if alpha is requested (see pick_xrgba_config()). The reason EGL/Mesa did not list them (and thus breaking transparency) is because we requested a EGL_ALPHA_SIZE != 0 if alpha is requested. But the transparent EGLConfigs use EGL_ALPHA_SIZE == 0. That's because EGL doesn't actually support the concept of transparent windows; the alpha size parameter is something else (memory rendering without FBOs or something, I don't care enough to look up the real reasons). This still won't work on Wayland. Every EGL backend needs platform specific code. (Good job, EGL, such an awesome platform independent standard.) Fixes: #6590
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/egl_helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/egl_helpers.c b/video/out/opengl/egl_helpers.c
index ad026ba253..564068a448 100644
--- a/video/out/opengl/egl_helpers.c
+++ b/video/out/opengl/egl_helpers.c
@@ -120,7 +120,7 @@ static bool create_context(struct ra_ctx *ctx, EGLDisplay display,
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
- EGL_ALPHA_SIZE, ctx->opts.want_alpha ? 1 : 0,
+ EGL_ALPHA_SIZE, 0,
EGL_RENDERABLE_TYPE, rend,
EGL_NONE
};