Wow, that’s some dire consequences of rounded corners.
Weird that they can composit a play button on top of the video, but not rounded corners 🤔
Solution: make 4 buttons, copy whatever’s underneath the window corners into the buttons, draw/erase the round window corners, and place them in the corners of the window :þ
Depends whether the window is a rectangle with rounded corners or an actual squircle :)
No, the play button obviously also prevents the simple naive direct scanout. They are equivalent, IIUC they were used in different contexts in the post.
The hardware does support “video as underlay” which would be required to draw anything over the video, well AMD does at least but the compositor has to be clever enough to leverage it by moving the desktop to an overlay plane (!)
The article says that GTK can use zero-copy direct scanout when the video is unobscured; when there is a play button it can move the video to an underlay with hardware-assisted compositing; but when there are rounded corners GTK cannot offload video compositing at all. What is weird is that the article implies GTK is unable to use the same trick as the play button to get offload with rounded corners, but it doesn’t explain where that limitation comes from.
My guess is that there’s no longer a single surface the application could be rendering into, and there’s some server-side clipping that has to happen for squirkle corners, which implies the need to rasterize into a texture to post-process, whereas when there’s no boundary edges from the frame, there’s no need to clip, and hence rasterize.