mirror of
https://github.com/mpv-player/mpv
synced 2025-03-20 02:09:52 +00:00
vo: replace max swapchain depth magic number
This commit is contained in:
parent
bd4bf6e383
commit
cf69fa03ca
@ -216,7 +216,7 @@ static const m_option_t mp_vo_opt_list[] = {
|
||||
#if HAVE_EGL_ANDROID
|
||||
{"android-surface-size", OPT_SIZE_BOX(android_surface_size)},
|
||||
#endif
|
||||
{"swapchain-depth", OPT_INT(swapchain_depth), M_RANGE(1, 8)},
|
||||
{"swapchain-depth", OPT_INT(swapchain_depth), M_RANGE(1, VO_MAX_SWAPCHAIN_DEPTH)},
|
||||
{"override-display-fps", OPT_REPLACED("display-fps-override")},
|
||||
{0}
|
||||
};
|
||||
|
@ -1030,7 +1030,7 @@ bool vo_drm_init(struct vo *vo)
|
||||
|
||||
drm->ev.version = DRM_EVENT_CONTEXT_VERSION;
|
||||
drm->ev.page_flip_handler = &drm_pflip_cb;
|
||||
drm->present = mp_present_initialize(drm, 8); // max swapchain depth allowed
|
||||
drm->present = mp_present_initialize(drm, VO_MAX_SWAPCHAIN_DEPTH);
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -192,6 +192,7 @@ enum {
|
||||
};
|
||||
|
||||
#define VO_MAX_REQ_FRAMES 10
|
||||
#define VO_MAX_SWAPCHAIN_DEPTH 8
|
||||
|
||||
struct vo;
|
||||
struct osd_state;
|
||||
|
@ -2280,10 +2280,10 @@ bool vo_wayland_init(struct vo *vo)
|
||||
if (wl->presentation) {
|
||||
wl->fback_pool = talloc_zero(wl, struct vo_wayland_feedback_pool);
|
||||
wl->fback_pool->wl = wl;
|
||||
wl->fback_pool->len = 8; // max swapchain depth allowed
|
||||
wl->fback_pool->len = VO_MAX_SWAPCHAIN_DEPTH;
|
||||
wl->fback_pool->fback = talloc_zero_array(wl->fback_pool, struct wp_presentation_feedback *,
|
||||
wl->fback_pool->len);
|
||||
wl->present = mp_present_initialize(wl, 8); // max swapchain depth allowed
|
||||
wl->present = mp_present_initialize(wl, VO_MAX_SWAPCHAIN_DEPTH);
|
||||
} else {
|
||||
MP_VERBOSE(wl, "Compositor doesn't support the %s protocol!\n",
|
||||
wp_presentation_interface.name);
|
||||
|
@ -626,7 +626,7 @@ bool vo_x11_init(struct vo *vo)
|
||||
|
||||
x11_error_output = x11->log;
|
||||
XSetErrorHandler(x11_errorhandler);
|
||||
x11->present = mp_present_initialize(x11, 8); // max swapchain depth allowed
|
||||
x11->present = mp_present_initialize(x11, VO_MAX_SWAPCHAIN_DEPTH);
|
||||
|
||||
dispName = XDisplayName(NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user