From f235bfbf361bbfb8e3972d0d8db30031ac664799 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Mon, 30 May 2022 17:44:36 -0500 Subject: wayland: force vo_vaapi_wayland scaling to 1 The wayland stuff is designed to update/rescale itself whenever the wl_output scale changes. This is great, but vo_vaapi_wayland should not actually attempt to handle any hidpi stuff. The point of this VO is to hand off as much to the compositor as possible, so we do want the compositor to do the scaling here (enjoy your bilinear). This fixes some incorrect rendering that could occur with scaling values not equal 1 due to mismatches between buffer coordinates and the surface local coordinates. It also eliminates the need to specify --no-hidpi-window-scale on hidpi displays (has the same practical effect). --- video/out/wayland_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/out') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 282fefefef..1c8d2097c8 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1492,8 +1492,9 @@ static int set_screensaver_inhibitor(struct vo_wayland_state *wl, int state) static void set_surface_scaling(struct vo_wayland_state *wl) { + bool vaapi_wayland = !strcmp(wl->vo->driver->name, "vaapi-wayland"); int old_scale = wl->scaling; - if (wl->vo_opts->hidpi_window_scale) { + if (wl->vo_opts->hidpi_window_scale && !vaapi_wayland) { wl->scaling = wl->current_output->scale; } else { wl->scaling = 1; -- cgit v1.2.3