options: replace --wayland-disable-vsync with --wayland-internal-vsync
With the upcoming fixes to FIFO in wayland, it should be preferable to use FIFO instead of our own hacky heuristic. This means --wayland-disable-vsync should become a tristate option with an "auto" behavior (not implemented in this commit). The semantics have to slightly change so introduce --wayland-internal-vsync and deprecate --wayland-disable-vsync.
This commit is contained in:
1 parent
7f4add8ddb
commit
319687f387
8 files changed
+18
-10
No files matched your search
@@ -0,0 +1,2 @@
|
||||
deprecate `--wayland-disable-vsync`
|
||||
add `--wayland-internal-vsync` as a replacement for `--wayland-disable-vsync`
|
||||
@@ -6159,11 +6159,6 @@ them.
|
||||
(default) will automatically switch between telling the compositor the content
|
||||
is a photo, video or possibly none depending on internal heuristics.
|
||||
|
||||
``--wayland-disable-vsync=<yes|no>``
|
||||
Disable mpv's internal vsync for Wayland-based video output (default: no).
|
||||
This is mainly useful for benchmarking wayland VOs when combined with
|
||||
``video-sync=display-desync``, ``--audio=no``, and ``--untimed=yes``.
|
||||
|
||||
``--wayland-edge-pixels-pointer=<value>``
|
||||
Defines the size of an edge border (default: 16) to initiate client side
|
||||
resize events in the wayland contexts with the mouse. This is only active if
|
||||
@@ -6173,6 +6168,12 @@ them.
|
||||
Defines the size of an edge border (default: 32) to initiate client side
|
||||
resizes events in the wayland contexts with touch events.
|
||||
|
||||
``--wayland-internal-vsync=<no|auto|yes>``
|
||||
Controls whether to use mpv's internal vsync for Wayland-base video outputs
|
||||
(default: ``auto``). This is mainly useful for benchmarking wayland VOs when
|
||||
combined with ``video-sync=display-desync``, ``--audio=no``, and
|
||||
``--untimed=yes``.
|
||||
|
||||
``--wayland-present=<yes|no>``
|
||||
Enable the use of wayland's presentation time protocol for more accurate
|
||||
frame presentation if it is supported by the compositor (default: ``yes``).
|
||||
|
||||
+5
-1
@@ -206,7 +206,10 @@ static const m_option_t mp_vo_opt_list[] = {
|
||||
{"auto", -1}, {"no", 0}, {"yes", 1})},
|
||||
{"wayland-content-type", OPT_CHOICE(wl_content_type, {"auto", -1}, {"none", 0},
|
||||
{"photo", 1}, {"video", 2}, {"game", 3})},
|
||||
{"wayland-disable-vsync", OPT_BOOL(wl_disable_vsync)},
|
||||
{"wayland-disable-vsync", OPT_BOOL(wl_disable_vsync),
|
||||
.deprecation_message = "replaced by --wayland-internal-vsync=no"},
|
||||
{"wayland-internal-vsync", OPT_CHOICE(wl_internal_vsync,
|
||||
{"no", 0}, {"auto", 1}, {"yes", 2})},
|
||||
{"wayland-edge-pixels-pointer", OPT_INT(wl_edge_pixels_pointer),
|
||||
M_RANGE(0, INT_MAX)},
|
||||
{"wayland-edge-pixels-touch", OPT_INT(wl_edge_pixels_touch),
|
||||
@@ -274,6 +277,7 @@ const struct m_sub_options vo_sub_opts = {
|
||||
.wl_content_type = -1,
|
||||
.wl_edge_pixels_pointer = 16,
|
||||
.wl_edge_pixels_touch = 32,
|
||||
.wl_internal_vsync = 1,
|
||||
.wl_present = true,
|
||||
.mmcss_profile = "Playback",
|
||||
.ontop_level = -1,
|
||||
|
||||
@@ -39,6 +39,7 @@ typedef struct mp_vo_opts {
|
||||
int wl_configure_bounds;
|
||||
int wl_content_type;
|
||||
bool wl_disable_vsync;
|
||||
int wl_internal_vsync;
|
||||
int wl_edge_pixels_pointer;
|
||||
int wl_edge_pixels_touch;
|
||||
bool wl_present;
|
||||
|
||||
@@ -69,7 +69,7 @@ static void wayland_egl_swap_buffers(struct ra_ctx *ctx)
|
||||
|
||||
eglSwapBuffers(p->egl_display, p->egl_surface);
|
||||
|
||||
if (!wl->opts->wl_disable_vsync)
|
||||
if (wl->opts->wl_internal_vsync)
|
||||
vo_wayland_wait_frame(wl);
|
||||
|
||||
if (wl->use_present)
|
||||
|
||||
@@ -653,7 +653,7 @@ static void flip_page(struct vo *vo)
|
||||
wl_surface_commit(wl->osd_surface);
|
||||
wl_surface_commit(wl->surface);
|
||||
|
||||
if (!wl->opts->wl_disable_vsync)
|
||||
if (wl->opts->wl_internal_vsync)
|
||||
vo_wayland_wait_frame(wl);
|
||||
|
||||
if (wl->use_present)
|
||||
|
||||
@@ -302,7 +302,7 @@ static void flip_page(struct vo *vo)
|
||||
vo->dheight);
|
||||
wl_surface_commit(wl->surface);
|
||||
|
||||
if (!wl->opts->wl_disable_vsync)
|
||||
if (wl->opts->wl_internal_vsync)
|
||||
vo_wayland_wait_frame(wl);
|
||||
|
||||
if (wl->use_present)
|
||||
|
||||
@@ -36,7 +36,7 @@ static void wayland_vk_swap_buffers(struct ra_ctx *ctx)
|
||||
{
|
||||
struct vo_wayland_state *wl = ctx->vo->wl;
|
||||
|
||||
if (!wl->opts->wl_disable_vsync)
|
||||
if (wl->opts->wl_internal_vsync)
|
||||
vo_wayland_wait_frame(wl);
|
||||
|
||||
if (wl->use_present)
|
||||
|
||||
Reference in new issue
Block a user