summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-01-20 13:38:28 +0100
committerwm4 <wm4@nowhere>2017-01-20 13:40:59 +0100
commitd890e0731c0a0c002c32e8be89130e178059d3ba (patch)
tree4e8d805b00283d24f1ee2edb72350b3bc5fe7e5c /video/out/vo_opengl.c
parenta35a5bb5f3c67f867ac6a21cad479657085f0230 (diff)
downloadmpv-d890e0731c0a0c002c32e8be89130e178059d3ba.tar.bz2
mpv-d890e0731c0a0c002c32e8be89130e178059d3ba.tar.xz
options: refactor how --opengl-dcomposition is declared
vo_opengl used to have it as sub-option, which made it very hard to pass down option values to backends in a generic way (even if these options were completely backend-specific). For --opengl-dcomposition we used a VOFLAG to deal with this. Fortunately, sub-options are gone, and we can just add it as global option. Move the option to context_angle.c and add it as global option. I thought about adding a mechanism to let backends declare options, which would get magically picked up my m_config instead of having to add them to the global option list manually (similar to VO vo_driver.options), but decided against this complexity just for 1 or 2 backends. Likewise, it could have been added as a single option to avoid the boilerplate of an option struct, but then again there are probably going to be more angle suboptions, and it's cleaner.
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r--video/out/vo_opengl.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index be187f63c3..72e889931e 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -55,7 +55,6 @@ struct vo_opengl_opts {
int allow_sw;
int swap_interval;
int dwm_flush;
- int allow_direct_composition;
int vsync_fences;
char *backend;
int es;
@@ -383,9 +382,6 @@ static int preinit(struct vo *vo)
if (p->opts.allow_sw)
vo_flags |= VOFLAG_SW;
- if (p->opts.allow_direct_composition)
- vo_flags |= VOFLAG_ANGLE_DCOMP;
-
p->glctx = mpgl_init(vo, p->opts.backend, vo_flags);
if (!p->glctx)
goto err_out;
@@ -444,7 +440,6 @@ const struct vo_driver video_out_opengl = {
OPT_INT("opengl-swapinterval", opts.swap_interval, 0),
OPT_CHOICE("opengl-dwmflush", opts.dwm_flush, 0,
({"no", -1}, {"auto", 0}, {"windowed", 1}, {"yes", 2})),
- OPT_FLAG("opengl-dcomposition", opts.allow_direct_composition, 0),
OPT_FLAG("opengl-debug", opts.use_gl_debug, 0),
OPT_STRING_VALIDATE("opengl-backend", opts.backend, 0,
mpgl_validate_backend_opt),
@@ -459,7 +454,6 @@ const struct vo_driver video_out_opengl = {
.priv_defaults = &(const struct gl_priv){
.opts = {
.swap_interval = 1,
- .allow_direct_composition = 1,
},
},
};