In fullscreen, always create a buffer of the size requested by the compositor
With either --vo=opengl:backend=wayland or --vo=wayland, mpv doesn’t honor the size request from the compositor if the video’s aspect ratio doesn’t match the output’s aspect ratio. This is actually allowed by the wl_shell protocol, but results in poor performances in Weston (since it will then composite mpv’s surface alongside black surfaces to make up for the missing space, doing a non-required pass through GLES again), or bad rendering in gnome-shell (see #2657, which likely shares Weston’s behaviour to prevent the primary plane from being used).
Here is an example of WAYLAND_DEBUG=client log where I’m playing a 1920×1038 video on a 1920×1080 output:
[640918.946] -> [email protected]_fullscreen(0, 0, nil)
[640919.910] [email protected](0, 1920, 1080)
[…]
[641107.470] -> [email protected]_prime_buffer(new id wl_buffer@22, fd 19, 1920, 1038, 875713112, 0, 7680, 0, 0, 0, 0)
As I have some tearing under X11, I would love to see this issue solved...
How's the progress so far? Would love to start using mpv again :)