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

vo_dmabuf_wayland: unmap osd surface when not needed #12237

Merged
merged 1 commit into from Aug 28, 2023

Conversation

rmader
Copy link
Contributor

@rmader rmader commented Aug 24, 2023

Attaching a NULL buffer unmaps the surface, allowing compositors to skip blending the empty buffer.

Closes #12236

@llyyr
Copy link
Contributor

llyyr commented Aug 24, 2023

This causes subtitles and osd to not be visible anytime the osd isn't explicitly being updated. To test you can load any video with subtitles, or press Shift+I to see stats.lua

@rmader
Copy link
Contributor Author

rmader commented Aug 24, 2023

Ah, indeed :/

So I guess that brings us back to what I mentioned in #12236:

Add a way to find out when a osd redraw ended up making it fully transparent (this is the hard part I didn't immediately found a solution for :) )

@rmader rmader marked this pull request as draft August 24, 2023 19:50
@Dudemanguy
Copy link
Member

This causes subtitles and osd to not be visible anytime the osd isn't explicitly being updated.

Oh bummer, I had assumed that draw_osd would apply to subtitles being rendered as well but I guess not.

@rmader
Copy link
Contributor Author

rmader commented Aug 24, 2023

Oh bummer, I had assumed that draw_osd would apply to subtitles being rendered as well but I guess not.

The good news is: either the osd already has a way to detect the case - or introducing it would be helpful for other backends as well (I assume).

@Dudemanguy
Copy link
Member

Yeah, this isn't really trivial unfortunately. The osd and sub visibility would need to be done in the core and then signaled in some way to the VOs that want it. Not sure what the right approach would be atm.

@rmader rmader marked this pull request as ready for review August 28, 2023 16:28
@rmader
Copy link
Contributor Author

rmader commented Aug 28, 2023

Turns out the backend does already give us what we need \o/
Updated, now working as expected for me.

Attaching a NULL buffer unmaps the surface, allowing compositors to skip
blending the empty buffer.

Closes mpv-player#12236
@rmader
Copy link
Contributor Author

rmader commented Aug 28, 2023

Latest push does a small naming adjustment to bring the two new variables more in line.

Copy link
Member

@Dudemanguy Dudemanguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

@Dudemanguy Dudemanguy merged commit 5a690a1 into mpv-player:master Aug 28, 2023
13 checks passed
@rmader
Copy link
Contributor Author

rmader commented Aug 30, 2023

@Dudemanguy sorry for the noise, but just out of interest: is there a point release planned in the coming months? It would be awesome if the upcoming distro releases would ship with this :)

@Dudemanguy
Copy link
Member

No firm plans right now, but given that there's been several fixes since 0.36 and that release has some pretty user visible breakage (particularly in regards to subtitles; hopefully it's all fixed now), a point release wouldn't be unwarranted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vo_dmabuf_wayland: osd surface should be unmapped when fully transparent / not needed
3 participants