summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/context_angle.c
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2016-08-18 17:46:59 +0300
committerJames Ross-Gowan <rossymiles@gmail.com>2016-08-25 23:47:37 +1000
commitef0b2e33b1cc8d064f64b864443bf1c233691508 (patch)
tree984f6f4a2c751bbe63cac8bfaec6100ff7fcfac2 /video/out/opengl/context_angle.c
parent2a5b61244f55f4f5644ce21c3d03ff2ac8cba751 (diff)
downloadmpv-ef0b2e33b1cc8d064f64b864443bf1c233691508.tar.bz2
mpv-ef0b2e33b1cc8d064f64b864443bf1c233691508.tar.xz
vo_opengl: angle: new opengl flag to control DirectComposition
On some systems DirectComposition might behave poorly. Add an opengl suboption flag 'dcomposition' (default=yes) which can disable it.
Diffstat (limited to 'video/out/opengl/context_angle.c')
-rw-r--r--video/out/opengl/context_angle.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/video/out/opengl/context_angle.c b/video/out/opengl/context_angle.c
index ebc803fdb1..b0d637cebd 100644
--- a/video/out/opengl/context_angle.c
+++ b/video/out/opengl/context_angle.c
@@ -306,8 +306,13 @@ static int angle_init(struct MPGLContext *ctx, int flags)
// EGL_DIRECT_COMPOSITION_ANGLE enables the use of flip-mode present, which
// avoids a copy of the video image and lowers vsync jitter, though the
- // extension is only present on Windows 8 and up.
- if (strstr(exts, "EGL_ANGLE_direct_composition")) {
+ // extension is only present on Windows 8 and up, and might have subpar
+ // behavior with some drivers (Intel? symptom - whole desktop is black for
+ // some seconds after spending some minutes in fullscreen and then leaving
+ // fullscreen).
+ if ((flags & VOFLAG_ANGLE_DCOMP) &&
+ strstr(exts, "EGL_ANGLE_direct_composition"))
+ {
MP_TARRAY_APPEND(NULL, window_attribs, window_attribs_len,
EGL_DIRECT_COMPOSITION_ANGLE);
MP_TARRAY_APPEND(NULL, window_attribs, window_attribs_len, EGL_TRUE);