WebPlatformForEmbedded / WPEWebKit

WPE WebKit port (downstream)
210 stars 135 forks source link

Disable blending of hole punching buffers with rounded rect clip #1300

Closed emutavchi closed 3 months ago

emutavchi commented 3 months ago

Fixes hole punching when page layout applies rounding rect clip to hole punching layer. Reproducible with desktop version of YouTube: https://www.youtube.com/watch?v=TRgqtaYb4sU

magomez commented 3 months ago

Yes, makes sense. Rounded rect clipping requires blending in order to paint transparent for the pixels that are outside of the clipping area. But holepunch can't blend, as it needs to overwrite the background. So disabling rounded rect clipping when holepunch is enabled is the way to go.

magomez commented 3 months ago

I found a problem with this while trying to move it upstream. This disables rounded rect clipping when rendering a holepunch buffer, bit it disables it for every defined rounded rectangle clipping, not only for the one applied to the video layer. This breaks cases where the video element is inside some other element that also has rounded corners. I'm working on a improved fix upstream. I'll revert this and backport the new fix it to 2.38 and 2.42 when it's done.