summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-28 19:40:52 +0100
committerwm4 <wm4@nowhere>2015-01-28 19:40:52 +0100
commit616481ad290b3bc43d551d946dd5c0fe7423f8b2 (patch)
treecd1fb481d62b3916d5db06a9265460a90d9e27c0 /video/out/gl_common.c
parent3583559164b922673b2ccdb31f810befae613779 (diff)
downloadmpv-616481ad290b3bc43d551d946dd5c0fe7423f8b2.tar.bz2
mpv-616481ad290b3bc43d551d946dd5c0fe7423f8b2.tar.xz
vo_opengl: remove some unused functions
These were intended for some plans that were never realized. Also move some comments around and fix them.
Diffstat (limited to 'video/out/gl_common.c')
-rw-r--r--video/out/gl_common.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/video/out/gl_common.c b/video/out/gl_common.c
index 6b2bc388ed..577b24abec 100644
--- a/video/out/gl_common.c
+++ b/video/out/gl_common.c
@@ -617,6 +617,8 @@ static MPGLContext *mpgl_create(struct vo *vo, const char *backend_name)
return ctx;
}
+// Create a VO window and create a GL context on it.
+// vo_flags: passed to the backend's create window function
MPGLContext *mpgl_init(struct vo *vo, const char *backend_name, int vo_flags)
{
MPGLContext *ctx = mpgl_create(vo, backend_name);
@@ -651,9 +653,10 @@ cleanup:
return NULL;
}
-bool mpgl_reconfig_window(struct MPGLContext *ctx, int flags)
+// flags: passed to the backend function
+bool mpgl_reconfig_window(struct MPGLContext *ctx, int vo_flags)
{
- return ctx->config_window(ctx, flags);
+ return ctx->config_window(ctx, vo_flags);
}
void mpgl_uninit(MPGLContext *ctx)
@@ -665,29 +668,14 @@ void mpgl_uninit(MPGLContext *ctx)
talloc_free(ctx);
}
-void mpgl_set_context(MPGLContext *ctx)
+void mpgl_lock(MPGLContext *ctx)
{
if (ctx->set_current)
ctx->set_current(ctx, true);
}
-void mpgl_unset_context(MPGLContext *ctx)
+void mpgl_unlock(MPGLContext *ctx)
{
if (ctx->set_current)
ctx->set_current(ctx, false);
}
-
-void mpgl_lock(MPGLContext *ctx)
-{
- mpgl_set_context(ctx);
-}
-
-void mpgl_unlock(MPGLContext *ctx)
-{
- mpgl_unset_context(ctx);
-}
-
-bool mpgl_is_thread_safe(MPGLContext *ctx)
-{
- return !!ctx->set_current;
-}