4 ms·
I’m not sure I understand why an overlay allows partial offloading while rounding the corner of the video does not. Couldn’t the rounded corners of a video als
by jiehong 3y ago
I’m not sure I understand why an overlay allows partial offloading while rounding the corner of the video does not.
Couldn’t the rounded corners of a video also be an overlay?
I’m sure I’m missing something here, but the article does not explain that point.
- andyferris 3y agoI think it’s that the _window_ has rounded corners, and you don’t want the content appearing outside the window.
- audidude 3y agoNo, you can already be sure it's the right size. This has to do with what it takes to occlude the rounded area from the final display.
- orra 3y agoI'd love to know the answer to that. This is fantastic work, but it'd be a shame for it to be scunnered by rounded corners.
- phkahler 3y agoBecause the UX folks want what they want. I want my UI out of the way, including the corners of video and my CPU load.
- play_ac 3y ago>Couldn’t the rounded corners of a video also be an overlay? No because the clipping is done in the client after the content is drawn. The client doesn't have the full screen contents. To make it work with an overlay, the clipping would have to be moved to the server. There could be another extension that lets you pass an alpha mask texture to the server to use as a clip mask. But this doesn't exist (yet?)
- audidude 3y agoAnd even if it did, you can't do clip masks with scanout overlays. So you have to composite (and therefore take the hit of ramping up the 3d capabilities of the GPU).
- play_ac 3y agoYes you can, what you would do is clip against the main framebuffer and leave the window area transparent by inverting the mask. Then you can have the other plane underneath the main one. This is only if your hardware supports that though.
- audidude 3y agoPresumably that would still cause issues at the rounded corners because you need to blend those pixels to make them look nice.
- audidude 3y agoIf you have the video extend to where the corners are rounded, you must use a "rounded clip" on the video ontop of the shadow region (since they butt). That means you have to power up the 3d part of the GPU to do that (because the renderer does it in shaders). Where as if you add some 9 pixels of black above/below to account for the rounded corner, there is no clipping of the video and you can use hardware scanout planes. That's important because keeping the 3d part of the GPU turned off is a huge power savings. And the scanout plane can already scale for you to the correct size.