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).
This commit is contained in:
Dudemanguy 2022-05-30 17:44:36 -05:00
parent 1ff2153245
commit f235bfbf36
1 changed files with 2 additions and 1 deletions

View File

@ -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) 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; 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; wl->scaling = wl->current_output->scale;
} else { } else {
wl->scaling = 1; wl->scaling = 1;