From 72915e8b76b2e5da9ddc90e892a544b6de512f39 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 29 Nov 2021 12:39:20 +0100 Subject: {player,video}: remove references to obsolete opengl-cb API --- video/out/gpu/ra.h | 4 ++-- video/out/opengl/common.c | 18 ------------------ video/out/opengl/common.h | 2 -- video/out/opengl/libmpv_gl.c | 16 ++-------------- video/out/vo.h | 2 +- 5 files changed, 5 insertions(+), 37 deletions(-) (limited to 'video/out') diff --git a/video/out/gpu/ra.h b/video/out/gpu/ra.h index 4067b52425..cc7fd570f1 100644 --- a/video/out/gpu/ra.h +++ b/video/out/gpu/ra.h @@ -47,8 +47,8 @@ struct ra { }; // For passing through windowing system specific parameters and such. The -// names are always internal (except for legacy opengl-cb uses; the libmpv -// render API uses mpv_render_param_type and maps them to names internally). +// names are always internal (the libmpv render API uses mpv_render_param_type +// and maps them to names internally). // For example, a name="x11" entry has a X11 display as (Display*)data. struct ra_native_resource { const char *name; diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c index b0d37bec44..d5883d4a4d 100644 --- a/video/out/opengl/common.c +++ b/video/out/opengl/common.c @@ -479,24 +479,6 @@ static const struct gl_functions gl_functions[] = { {0} }, }, - // These don't exist - they are for the sake of mpv internals, and libmpv - // interaction (see libmpv/opengl_cb.h). - // This is not used by the render API, only the deprecated opengl-cb API. - { - .extension = "GL_MP_MPGetNativeDisplay", - .functions = (const struct gl_function[]) { - DEF_FN(MPGetNativeDisplay), - {0} - }, - }, - // Same, but using the old name. - { - .extension = "GL_MP_D3D_interfaces", - .functions = (const struct gl_function[]) { - DEF_FN_NAME(MPGetNativeDisplay, "glMPGetD3DInterface"), - {0} - }, - }, { .extension = "GL_ANGLE_translated_shader_source", .functions = (const struct gl_function[]) { diff --git a/video/out/opengl/common.h b/video/out/opengl/common.h index f89fcc953b..1292be45b2 100644 --- a/video/out/opengl/common.h +++ b/video/out/opengl/common.h @@ -242,8 +242,6 @@ struct GL { void (GLAPIENTRY *DebugMessageCallback)(MP_GLDEBUGPROC callback, const void *userParam); - - void *(GLAPIENTRY *MPGetNativeDisplay)(const char *name); }; #endif /* MPLAYER_GL_COMMON_H */ diff --git a/video/out/opengl/libmpv_gl.c b/video/out/opengl/libmpv_gl.c index ae6ec66ca4..e916a3c45d 100644 --- a/video/out/opengl/libmpv_gl.c +++ b/video/out/opengl/libmpv_gl.c @@ -25,7 +25,7 @@ static int init(struct libmpv_gpu_context *ctx, mpv_render_param *params) mpgl_load_functions2(p->gl, init_params->get_proc_address, init_params->get_proc_address_ctx, - init_params->extra_exts, ctx->log); + NULL, ctx->log); if (!p->gl->version && !p->gl->es) { MP_FATAL(ctx, "OpenGL not initialized.\n"); return MPV_ERROR_UNSUPPORTED; @@ -42,7 +42,7 @@ static int init(struct libmpv_gpu_context *ctx, mpv_render_param *params) static const struct ra_swapchain_fns empty_swapchain_fns = {0}; struct ra_gl_ctx_params gl_params = { - // vo_opengl_cb is essentially like a gigantic external swapchain where + // vo_libmpv is essentially like a gigantic external swapchain where // the user is in charge of presentation / swapping etc. But we don't // actually need to provide any of these functions, since we can just // not call them to begin with - so just set it to an empty object to @@ -63,18 +63,6 @@ static int init(struct libmpv_gpu_context *ctx, mpv_render_param *params) ctx->ra = p->ra_ctx->ra; - // Legacy API user loading for opengl-cb. Explicitly inactive for render API. - if (get_mpv_render_param(params, (mpv_render_param_type)-1, NULL) == - ctx->global && p->gl->MPGetNativeDisplay) - { - void *x11 = p->gl->MPGetNativeDisplay("x11"); - if (x11) - ra_add_native_resource(ctx->ra, "x11", x11); - void *wl = p->gl->MPGetNativeDisplay("wl"); - if (wl) - ra_add_native_resource(ctx->ra, "wl", wl); - } - return 0; } diff --git a/video/out/vo.h b/video/out/vo.h index 8e17b3cf42..7ab19a96f1 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -80,7 +80,7 @@ enum mp_voctrl { // be updated and redrawn. Optional; emulated if not available. VOCTRL_REDRAW_FRAME, - // Only used internally in vo_opengl_cb + // Only used internally in vo_libmpv VOCTRL_PREINIT, VOCTRL_UNINIT, VOCTRL_RECONFIG, -- cgit v1.2.3