summaryrefslogtreecommitdiffstats
path: root/video/out/opengl
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-03 18:20:16 +0200
committerwm4 <wm4@nowhere>2015-10-03 18:20:16 +0200
commit291f301c105ca989db6165108fd9dd1c57cde56d (patch)
treedf9f106e86282f2978136dd6820fa76894ccae5f /video/out/opengl
parente448e10fd7768c509c528f9291d372fa9760919d (diff)
downloadmpv-291f301c105ca989db6165108fd9dd1c57cde56d.tar.bz2
mpv-291f301c105ca989db6165108fd9dd1c57cde56d.tar.xz
video/out: remove an unused parameter
This parameter has been unused for years (the last flag was removed in commit d658b115). Get rid of it. This affects the general VO API, as well as the vo_opengl backend API, so it touches a lot of files. The VOFLAGs are still used to control OpenGL context creation, so move them to the OpenGL backend code.
Diffstat (limited to 'video/out/opengl')
-rw-r--r--video/out/opengl/cocoa.c2
-rw-r--r--video/out/opengl/common.c5
-rw-r--r--video/out/opengl/common.h11
-rw-r--r--video/out/opengl/rpi.c2
-rw-r--r--video/out/opengl/w32.c2
-rw-r--r--video/out/opengl/wayland.c2
-rw-r--r--video/out/opengl/x11.c2
-rw-r--r--video/out/opengl/x11egl.c2
8 files changed, 17 insertions, 11 deletions
diff --git a/video/out/opengl/cocoa.c b/video/out/opengl/cocoa.c
index 50b149b6bc..7d367e99b4 100644
--- a/video/out/opengl/cocoa.c
+++ b/video/out/opengl/cocoa.c
@@ -150,7 +150,7 @@ static int cocoa_init(MPGLContext *ctx, int vo_flags)
return 0;
}
-static int cocoa_reconfig(struct MPGLContext *ctx, int flags)
+static int cocoa_reconfig(struct MPGLContext *ctx)
{
vo_cocoa_config_window(ctx->vo);
return 0;
diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c
index 5c4eeda7fd..f045184373 100644
--- a/video/out/opengl/common.c
+++ b/video/out/opengl/common.c
@@ -629,10 +629,9 @@ MPGLContext *mpgl_init(struct vo *vo, const char *backend_name, int vo_flags)
return ctx;
}
-// flags: passed to the backend function
-bool mpgl_reconfig_window(struct MPGLContext *ctx, int vo_flags)
+int mpgl_reconfig_window(struct MPGLContext *ctx)
{
- return ctx->driver->reconfig(ctx, vo_flags) >= 0;
+ return ctx->driver->reconfig(ctx);
}
int mpgl_control(struct MPGLContext *ctx, int *events, int request, void *arg)
diff --git a/video/out/opengl/common.h b/video/out/opengl/common.h
index 1da095db44..35d303e96c 100644
--- a/video/out/opengl/common.h
+++ b/video/out/opengl/common.h
@@ -74,6 +74,13 @@ enum {
#define MPGL_VER_P(ver) MPGL_VER_GET_MAJOR(ver), MPGL_VER_GET_MINOR(ver)
+enum {
+ VOFLAG_GLES = 1 << 0, // Hint to prefer GLES2 if possible
+ VOFLAG_GL_DEBUG = 1 << 1, // Hint to request debug OpenGL context
+ VOFLAG_ALPHA = 1 << 2, // Hint to request alpha framebuffer
+ VOFLAG_SW = 1 << 3, // Hint to accept a software GL renderer
+};
+
struct MPGLContext;
// A windowing backend (like X11, win32, ...), which provides OpenGL rendering.
@@ -93,7 +100,7 @@ struct mpgl_driver {
// Currently, there is an unfortunate interaction with ctx->vo, and
// display size etc. are determined by it.
// Return 0 on success, negative value (-1) on error.
- int (*reconfig)(struct MPGLContext *ctx, int flags);
+ int (*reconfig)(struct MPGLContext *ctx);
// Present the frame.
void (*swap_buffers)(struct MPGLContext *ctx);
@@ -126,7 +133,7 @@ typedef struct MPGLContext {
MPGLContext *mpgl_init(struct vo *vo, const char *backend_name, int vo_flags);
void mpgl_uninit(MPGLContext *ctx);
-bool mpgl_reconfig_window(struct MPGLContext *ctx, int vo_flags);
+int mpgl_reconfig_window(struct MPGLContext *ctx);
int mpgl_control(struct MPGLContext *ctx, int *events, int request, void *arg);
void mpgl_swap_buffers(struct MPGLContext *ctx);
diff --git a/video/out/opengl/rpi.c b/video/out/opengl/rpi.c
index 0e0f0813e9..79aad522e4 100644
--- a/video/out/opengl/rpi.c
+++ b/video/out/opengl/rpi.c
@@ -214,7 +214,7 @@ fail:
return -1;
}
-static int rpi_reconfig(struct MPGLContext *ctx, int flags)
+static int rpi_reconfig(struct MPGLContext *ctx)
{
struct priv *p = ctx->priv;
ctx->vo->dwidth = p->w;
diff --git a/video/out/opengl/w32.c b/video/out/opengl/w32.c
index c7b09fe87d..dca76b3406 100644
--- a/video/out/opengl/w32.c
+++ b/video/out/opengl/w32.c
@@ -257,7 +257,7 @@ fail:
return -1;
}
-static int w32_reconfig(struct MPGLContext *ctx, int flags)
+static int w32_reconfig(struct MPGLContext *ctx)
{
vo_w32_config(ctx->vo);
return 0;
diff --git a/video/out/opengl/wayland.c b/video/out/opengl/wayland.c
index f345cc1563..d0958e96a0 100644
--- a/video/out/opengl/wayland.c
+++ b/video/out/opengl/wayland.c
@@ -163,7 +163,7 @@ static void egl_create_window(struct vo_wayland_state *wl)
eglSwapInterval(wl->egl_context.egl.dpy, 0);
}
-static int waylandgl_reconfig(struct MPGLContext *ctx, int flags)
+static int waylandgl_reconfig(struct MPGLContext *ctx)
{
struct vo_wayland_state * wl = ctx->vo->wayland;
diff --git a/video/out/opengl/x11.c b/video/out/opengl/x11.c
index dfe86d8d1a..4d7efbac90 100644
--- a/video/out/opengl/x11.c
+++ b/video/out/opengl/x11.c
@@ -264,7 +264,7 @@ static int glx_init(struct MPGLContext *ctx, int vo_flags)
return -1;
}
-static int glx_reconfig(struct MPGLContext *ctx, int flags)
+static int glx_reconfig(struct MPGLContext *ctx)
{
vo_x11_config_vo_window(ctx->vo);
return 0;
diff --git a/video/out/opengl/x11egl.c b/video/out/opengl/x11egl.c
index 2b660f2904..fb29cb6268 100644
--- a/video/out/opengl/x11egl.c
+++ b/video/out/opengl/x11egl.c
@@ -167,7 +167,7 @@ uninit:
return false;
}
-static int mpegl_reconfig(struct MPGLContext *ctx, int flags)
+static int mpegl_reconfig(struct MPGLContext *ctx)
{
vo_x11_config_vo_window(ctx->vo);
return 0;