Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4df9391bfafa06f4869c34e701cc1ee6c94caf14
      
https://github.com/WebKit/WebKit/commit/4df9391bfafa06f4869c34e701cc1ee6c94caf14
  Author: Miguel Gomez <mago...@igalia.com>
  Date:   2024-11-05 (Tue, 05 Nov 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
    M Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferHolePunch.cpp
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferHolePunch.h

  Log Message:
  -----------
  Regression(280901@main)? [WPE][TextureMapper] Incorrect extra hole punches 
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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to