diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2016-08-18 17:46:59 +0300 |
---|---|---|
committer | James Ross-Gowan <rossymiles@gmail.com> | 2016-08-25 23:47:37 +1000 |
commit | ef0b2e33b1cc8d064f64b864443bf1c233691508 (patch) | |
tree | 984f6f4a2c751bbe63cac8bfaec6100ff7fcfac2 /video/out/vo_opengl.c | |
parent | 2a5b61244f55f4f5644ce21c3d03ff2ac8cba751 (diff) | |
download | mpv-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/vo_opengl.c')
-rw-r--r-- | video/out/vo_opengl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 8a7c797ea8..0e4c117352 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -70,6 +70,7 @@ struct gl_priv { int allow_sw; int swap_interval; int dwm_flush; + int allow_direct_composition; int opt_vsync_fences; char *backend; @@ -409,6 +410,9 @@ static int preinit(struct vo *vo) if (p->allow_sw) vo_flags |= VOFLAG_SW; + if (p->allow_direct_composition) + vo_flags |= VOFLAG_ANGLE_DCOMP; + p->glctx = mpgl_init(vo, p->backend, vo_flags); if (!p->glctx) goto err_out; @@ -460,6 +464,7 @@ static const struct m_option options[] = { OPT_INT("swapinterval", swap_interval, 0, OPTDEF_INT(1)), OPT_CHOICE("dwmflush", dwm_flush, 0, ({"no", -1}, {"auto", 0}, {"windowed", 1}, {"yes", 2})), + OPT_FLAG("dcomposition", allow_direct_composition, 0, OPTDEF_INT(1)), OPT_FLAG("debug", use_gl_debug, 0), OPT_STRING_VALIDATE("backend", backend, 0, mpgl_validate_backend_opt), OPT_FLAG("sw", allow_sw, 0), |