[webkit-changes] [WebKit/WebKit] 7f89d2: [TextureMapper] Preserve-3d layers don't get flatt...

Jani Hautakangas noreply at github.com
Tue Oct 29 01:14:41 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7f89d2259aab7f09b486a956fbdc7d1162fb0f92
      https://github.com/WebKit/WebKit/commit/7f89d2259aab7f09b486a956fbdc7d1162fb0f92
  Author: Jani Hautakangas <jani at kodegood.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/texmap/TextureMapper.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapper.h
    M Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
    M Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h

  Log Message:
  -----------
  [TextureMapper] Preserve-3d layers don't get flattened correctly
https://bugs.webkit.org/show_bug.cgi?id=281079

Reviewed by Nikolas Zimmermann and Fujii Hironori.

The TextureMapper incorrectly flattens layers to wrong 2D plane
in the 3D rendering context. Instead of accumulating 3D transformations
for each layer, it resets transformations to the page root layer's 2D plane
for leaf layers. This fix ensures that proper 3D transforms are applied
throughout the entire 3D context and leaf layers are flattened correctly.

Expected Behavior (as per CSS spec):

"The element establishing the 3D rendering context, along with other 3D transformed
elements participating in the context, should be rendered into its own plane.
This plane includes the element’s backgrounds, borders, box decorations, content,
and descendant elements—excluding descendants that have their own planes."

* Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperFlattenedLayer::TextureMapperFlattenedLayer):
(WebCore::TextureMapperFlattenedLayer::bind):
(WebCore::TextureMapperFlattenedLayer::layerRect const):
(WebCore::TextureMapperFlattenedLayer::surface const):
(WebCore::TextureMapperFlattenedLayer::paintToTextureMapper):
(WebCore::TextureMapperLayer::preprocess):
(WebCore::TextureMapperLayer::collectLayersToFlattenRecursive):
(WebCore::TextureMapperLayer::flatten):
(WebCore::TextureMapperLayer::computeFlattenedRegion):
(WebCore::TextureMapperLayer::postprocess):
(WebCore::TextureMapperLayer::freeFlattenedLayersRecursive):
(WebCore::TextureMapperLayer::computeTransformsRecursive):
(WebCore::TextureMapperLayer::paint):
(WebCore::TextureMapperLayer::paintSelf):
(WebCore::TextureMapperLayer::paintSelfAndChildren):
(WebCore::TextureMapperLayer::flattensAsLeafOf3DSceneOr3DPerspective const):
(WebCore::TextureMapperLayer::has3DLocalTransform const):
(WebCore::TextureMapperLayer::accumulatesTransform const):
(WebCore::TextureMapperLayer::computeOverlapRegions):
(WebCore::TextureMapperLayer::paintRecursive):
* Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h:

Canonical link: https://commits.webkit.org/285820@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list