1. 35

    1. 8

      Wow, that’s some dire consequences of rounded corners.

      1. 5

        Weird that they can composit a play button on top of the video, but not rounded corners 🤔

        1. 4

          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 :þ

          1. 1

            Depends whether the window is a rectangle with rounded corners or an actual squircle :)

        2. 3

          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 (!)

          1. 4

            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.

            1. 3

              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.