Regression(280901@main)? [WPE][TextureMapper] Incorrect extra hole punches with fixed body position#36120
Conversation
|
EWS run on current version of this PR (hash 076331c) Details |
|
an intermediate surface is used not only by preserve 3d layers.
|
Yes, I know. But I'm not trying to fix the general case here. Keeping the holepunch working for every possible situation is very complex. the goal is to keep it working in common scenarios. These common scenarios are: rendering to the main framebuffer (which is already working) and rendering to inside an stacking context that was created because of the position:fixed added to the body element.
Sure, that's the normal behavior.
This is the tricky part. When using an intermediate surface, it's not as simple as painting a transparent rect. We need to paint the rect in the main framebuffer and also in the intermediate surface, in a way that they overlap each other and the position where the video will be put below. This is because the intermediate texture is blended into the main frambuffer, so even if we we have a transparent rectangle there, it won't pierce the background.
Normal behavior again. |
|
I mean paiting the transparent rect outside of Then, we don't need to paint a transparent rect to intermediate buffers. |
I'm afraid I don't follow. Where does that pseudocode fit in the current painting code? Do you mean adding a second traverse of the tree to paint just the holepuch, besides the current paintRecursive? In that case, the hole will be painted before or after the normal content, but not in the appropriate order (defined by the position of the layer). Are you assuming that the holepunch can be painted after paintRecursive? Cause that's not the case, as overlays can be put over the transparent rect. |
…nches with fixed body position https://bugs.webkit.org/show_bug.cgi?id=281309 Reviewed by Carlos Garcia Campos. When rendering into a preserves3D subtree, we're rendering into an intermediate surface that, once ready, is blended into the main framebuffer. To make holepunching work in this situation we need to render the transparent rectangle in the intermediate surface, but also in the main framebuffer. To achieve this, when rendering into the intermediate surface we keep a vector of rects that need to be painted to the main framebuffer just before blending the intermediate surface. There are a couple of points that need to be taken into account though: the intermediate surface rendering is tiled, so the same TextureMapperLayer can be rendered several times, and it will receive an offset to compensate the rendering into the intermediate surface. In order to notify the video sink and render the transparent rectange in the main framebuffer, we need to use a transform that doesn't include the intermediate surface offset. But to paint into the intermediate surface we need to use the offsetted transform. To achieve this, we calculate the non offsetted transform in the first tile, and use it to notify the real video position to the video sink and the main framebuffer. Then we use the normal transform to paint the transparent rectangle into the intermediate surface. * Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::paintSelf): (WebCore::TextureMapperLayer::paintPreserves3DHolePunch): (WebCore::TextureMapperLayer::paintWith3DRenderingContext): * Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h: * Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h: (WebCore::TextureMapperPlatformLayer::notifyVideoPosition): (WebCore::TextureMapperPlatformLayer::paintTransparentRectangle): * Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferHolePunch.cpp: (WebCore::CoordinatedPlatformLayerBufferHolePunch::notifyVideoPosition): (WebCore::CoordinatedPlatformLayerBufferHolePunch::paintTransparentRectangle): * Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferHolePunch.h: Canonical link: https://commits.webkit.org/286146@main
076331c to
4df9391
Compare
|
Committed 286146@main (4df9391): https://commits.webkit.org/286146@main Reviewed commits have been landed. Closing PR #36120 and removing active labels. |
For example,
Hope punching doesn't work well with filter and opacity, etc.
I have a plan to rewrite some day in the future. |
|
Backported into the 2.46 branch as commit f5716b1 |
4df9391
076331c