mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 14:50:07 +00:00
video/out: remove unused config() parameters
This was cleaned up yesterday.
This commit is contained in:
parent
b9474ab875
commit
ca343d82a6
@ -29,8 +29,7 @@ static void gl_clear(void *ctx)
|
||||
gl->Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
static bool config_window_cocoa(struct MPGLContext *ctx, uint32_t d_width,
|
||||
uint32_t d_height, uint32_t flags)
|
||||
static bool config_window_cocoa(struct MPGLContext *ctx, int flags)
|
||||
{
|
||||
int rv = vo_cocoa_config_window(ctx->vo, flags,
|
||||
ctx->requested_gl_version >= MPGL_VER(3, 0));
|
||||
|
@ -957,15 +957,14 @@ MPGLContext *mpgl_init(struct vo *vo, const char *backend_name)
|
||||
return ctx;
|
||||
}
|
||||
|
||||
bool mpgl_config_window(struct MPGLContext *ctx, int gl_caps, uint32_t d_width,
|
||||
uint32_t d_height, uint32_t flags)
|
||||
bool mpgl_config_window(struct MPGLContext *ctx, int gl_caps, int flags)
|
||||
{
|
||||
gl_caps |= MPGL_CAP_GL;
|
||||
|
||||
ctx->requested_gl_version = (gl_caps & MPGL_CAP_GL_LEGACY)
|
||||
? MPGL_VER(2, 1) : MPGL_VER(3, 0);
|
||||
|
||||
if (ctx->config_window(ctx, d_width, d_height, flags)) {
|
||||
if (ctx->config_window(ctx, flags)) {
|
||||
int missing = (ctx->gl->mpgl_caps & gl_caps) ^ gl_caps;
|
||||
if (!missing)
|
||||
return true;
|
||||
|
@ -123,8 +123,7 @@ typedef struct MPGLContext {
|
||||
// GL context. (The caller must check if the created GL version is ok. The
|
||||
// callee must try to fall back to an older version if the requested
|
||||
// version is not available, and newer versions are incompatible.)
|
||||
bool (*config_window)(struct MPGLContext *ctx, uint32_t d_width,
|
||||
uint32_t d_height, uint32_t flags);
|
||||
bool (*config_window)(struct MPGLContext *ctx, int flags);
|
||||
|
||||
// An optional function to register a resize callback in the backend that
|
||||
// can be called on separate thread to handle resize events immediately
|
||||
@ -151,8 +150,7 @@ bool mpgl_is_thread_safe(MPGLContext *ctx);
|
||||
// gl_caps: bitfield of MPGL_CAP_* (required GL version and feature set)
|
||||
// flags: passed to the backend's create window function
|
||||
// Returns success.
|
||||
bool mpgl_config_window(struct MPGLContext *ctx, int gl_caps, uint32_t d_width,
|
||||
uint32_t d_height, uint32_t flags);
|
||||
bool mpgl_config_window(struct MPGLContext *ctx, int gl_caps, int flags);
|
||||
|
||||
int mpgl_find_backend(const char *name);
|
||||
|
||||
|
@ -168,8 +168,7 @@ out:
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool config_window_w32(struct MPGLContext *ctx, uint32_t d_width,
|
||||
uint32_t d_height, uint32_t flags)
|
||||
static bool config_window_w32(struct MPGLContext *ctx, int flags)
|
||||
{
|
||||
if (!vo_w32_config(ctx->vo, flags))
|
||||
return false;
|
||||
|
@ -146,10 +146,7 @@ static void egl_create_window(struct vo_wayland_state *wl)
|
||||
wl_display_dispatch_pending(wl->display.display);
|
||||
}
|
||||
|
||||
static bool config_window_wayland(struct MPGLContext *ctx,
|
||||
uint32_t d_width,
|
||||
uint32_t d_height,
|
||||
uint32_t flags)
|
||||
static bool config_window_wayland(struct MPGLContext *ctx, int flags)
|
||||
{
|
||||
struct vo_wayland_state * wl = ctx->vo->wayland;
|
||||
bool enable_alpha = !!(flags & VOFLAG_ALPHA);
|
||||
|
@ -197,8 +197,7 @@ static void set_glx_attrib(int *attribs, int name, int value)
|
||||
}
|
||||
}
|
||||
|
||||
static bool config_window_x11(struct MPGLContext *ctx, uint32_t d_width,
|
||||
uint32_t d_height, uint32_t flags)
|
||||
static bool config_window_x11(struct MPGLContext *ctx, int flags)
|
||||
{
|
||||
struct vo *vo = ctx->vo;
|
||||
struct glx_context *glx_ctx = ctx->priv;
|
||||
|
@ -543,8 +543,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *params, int flags)
|
||||
p->image_height = params->h;
|
||||
|
||||
int mpgl_caps = MPGL_CAP_GL_LEGACY;
|
||||
if (!mpgl_config_window(
|
||||
p->mpglctx, mpgl_caps, vo->dwidth, vo->dheight, flags))
|
||||
if (!mpgl_config_window(p->mpglctx, mpgl_caps, flags))
|
||||
return -1;
|
||||
|
||||
init_gl(vo, vo->dwidth, vo->dheight);
|
||||
|
@ -144,8 +144,7 @@ static int query_format(struct vo *vo, uint32_t format)
|
||||
return caps;
|
||||
}
|
||||
|
||||
static bool config_window(struct gl_priv *p, uint32_t d_width,
|
||||
uint32_t d_height, uint32_t flags)
|
||||
static bool config_window(struct gl_priv *p, int flags)
|
||||
{
|
||||
if (p->renderer_opts->stereo_mode == GL_3D_QUADBUFFER)
|
||||
flags |= VOFLAG_STEREO;
|
||||
@ -159,7 +158,7 @@ static bool config_window(struct gl_priv *p, uint32_t d_width,
|
||||
int mpgl_caps = MPGL_CAP_GL21 | MPGL_CAP_TEX_RG;
|
||||
if (!p->allow_sw)
|
||||
mpgl_caps |= MPGL_CAP_NO_SW;
|
||||
return mpgl_config_window(p->glctx, mpgl_caps, d_width, d_height, flags);
|
||||
return mpgl_config_window(p->glctx, mpgl_caps, flags);
|
||||
}
|
||||
|
||||
static void video_resize_redraw_callback(struct vo *vo, int w, int h)
|
||||
@ -175,7 +174,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *params, int flags)
|
||||
|
||||
mpgl_lock(p->glctx);
|
||||
|
||||
if (!config_window(p, vo->dwidth, vo->dheight, flags)) {
|
||||
if (!config_window(p, flags)) {
|
||||
mpgl_unlock(p->glctx);
|
||||
return -1;
|
||||
}
|
||||
@ -427,7 +426,7 @@ static int preinit(struct vo *vo)
|
||||
goto err_out;
|
||||
p->gl = p->glctx->gl;
|
||||
|
||||
if (!config_window(p, 320, 200, VOFLAG_HIDDEN))
|
||||
if (!config_window(p, VOFLAG_HIDDEN))
|
||||
goto err_out;
|
||||
|
||||
mpgl_set_context(p->glctx);
|
||||
|
@ -1699,8 +1699,7 @@ static int initGl(struct vo *vo, uint32_t d_width, uint32_t d_height)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static bool config_window(struct vo *vo, uint32_t d_width, uint32_t d_height,
|
||||
uint32_t flags)
|
||||
static bool config_window(struct vo *vo, int flags)
|
||||
{
|
||||
struct gl_priv *p = vo->priv;
|
||||
|
||||
@ -1710,7 +1709,7 @@ static bool config_window(struct vo *vo, uint32_t d_width, uint32_t d_height,
|
||||
int mpgl_caps = MPGL_CAP_GL_LEGACY;
|
||||
if (!p->allow_sw)
|
||||
mpgl_caps |= MPGL_CAP_NO_SW;
|
||||
return mpgl_config_window(p->glctx, mpgl_caps, d_width, d_height, flags);
|
||||
return mpgl_config_window(p->glctx, mpgl_caps, flags);
|
||||
}
|
||||
|
||||
static int reconfig(struct vo *vo, struct mp_image_params *params, int flags)
|
||||
@ -1733,7 +1732,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *params, int flags)
|
||||
|
||||
uninitGl(vo);
|
||||
|
||||
if (!config_window(vo, vo->dwidth, vo->dheight, flags))
|
||||
if (!config_window(vo, flags))
|
||||
return -1;
|
||||
|
||||
initGl(vo, vo->dwidth, vo->dheight);
|
||||
@ -2083,7 +2082,7 @@ static int preinit(struct vo *vo)
|
||||
p->gl = p->glctx->gl;
|
||||
|
||||
if (p->use_yuv == -1) {
|
||||
if (!config_window(vo, 320, 200, VOFLAG_HIDDEN))
|
||||
if (!config_window(vo, VOFLAG_HIDDEN))
|
||||
goto err_out;
|
||||
autodetectGlExtensions(vo);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user