-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wayland: use the surface-suspension-v1 protocol
Currently, mpv tries very hard to not do wasteful draws when the surface is hidden. This is accomplished by abusing vo_wayland_wait_frame and just guessing that consecutive timeouts == surface hidden. This works but it's pretty ugly (explaining why wl->timeout_count > 1 is an entire novel. Go dig up that commit if you're curious). Luckily, we now have the ability to just get suspended events from the compositor. Delete the entire timeout/hidden surface heuristic and use the surface_suspended and surface_resumed events instead. As a side effect of this, this means that mpv will always "overdraw" (i.e. render when not needed) if the compositor does not implement this protocol. If this bothers you, go bug your compositor developers to fix it and/or switch do a better one.
- Loading branch information
1 parent
a02901c
commit d31c7ac
Showing
7 changed files
with
55 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters