diff options
author | wm4 <wm4@nowhere> | 2015-12-19 13:12:51 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-12-19 14:14:12 +0100 |
commit | a0519f1d188e3d3be8f0e78a71868d7cbf1cc11d (patch) | |
tree | 90d2527b5e7e68c0bf451234f78cbb942f039f9e /video/out/opengl/video.c | |
parent | 4cc1861378c3b1e989b5d92ea49e3d02f5e4a65a (diff) | |
download | mpv-a0519f1d188e3d3be8f0e78a71868d7cbf1cc11d.tar.bz2 mpv-a0519f1d188e3d3be8f0e78a71868d7cbf1cc11d.tar.xz |
vo_opengl: cocoa: output premultiplied alpha
Which is apparently what is expected here. (I'm pretty sure X11
compositors want stright alpha, so 2 code paths are needed.)
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r-- | video/out/opengl/video.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index a96a95b5c7..fb7f9ee882 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -1527,6 +1527,8 @@ static void pass_convert_yuv(struct gl_video *p) GLSL(color.a = 1.0;) } else if (p->opts.alpha_mode == 2) { // blend GLSL(color = vec4(color.rgb * color.a, 1.0);) + } else if (p->gl->fb_premultiplied) { + GLSL(color = vec4(color.rgb * color.a, color.a);) } } |