Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In fullscreen, always create a buffer of the size requested by the compositor #3021

Closed
linkmauve opened this issue Apr 3, 2016 · 2 comments

Comments

@linkmauve
Copy link
Contributor

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]  -> wl_shell_surface@12.set_fullscreen(0, 0, nil)
[640919.910] wl_shell_surface@12.configure(0, 1920, 1080)
[…]
[641107.470]  -> wl_drm@19.create_prime_buffer(new id wl_buffer@22, fd 19, 1920, 1038, 875713112, 0, 7680, 0, 0, 0, 0)
@ghost ghost added the vo:gpu:wayland label Apr 3, 2016
@linkmauve linkmauve changed the title [wayland] In fullscreen, always create a buffer of the size requested by the compositor In fullscreen, always create a buffer of the size requested by the compositor Apr 3, 2016
@varyoo
Copy link

varyoo commented Apr 16, 2016

As I have some tearing under X11, I would love to see this issue solved...

@mypetbirdrules
Copy link

How's the progress so far? Would love to start using mpv again :)

linkmauve added a commit to linkmauve/mpv that referenced this issue May 8, 2016
When we receive the wl_shell_surface::configure event, it makes sense
to respect the aspect ratio of the video in windowed mode, but in
fullscreen it forces compositing and wastes resources (until atomic
modesetting is available everywhere and we can stop having
desynchronised planes).

Weston mitigates a resolution mismatch by creating black surfaces and
compositing them around the fullscreen surface, placed at the middle,
while GNOME puts it at the top-left and leaves the rest of the desktop
composited below, both of them producing a subpar experience.

Fixes mpv-player#3021, mpv-player#2657.
@ghost ghost closed this as completed in f99e48a May 8, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants