Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d40d59e4e5506747ab095ac2c3b337679e38265e https://github.com/WebKit/WebKit/commit/d40d59e4e5506747ab095ac2c3b337679e38265e Author: Jani Hautakangas <j...@kodegood.com> Date: 2024-11-14 (Thu, 14 Nov 2024)
Changed paths: M Source/WebCore/platform/TextureMapper.cmake A Source/WebCore/platform/graphics/texmap/FloatPlane3D.cpp A Source/WebCore/platform/graphics/texmap/FloatPlane3D.h A Source/WebCore/platform/graphics/texmap/FloatPolygon3D.cpp A Source/WebCore/platform/graphics/texmap/FloatPolygon3D.h 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 A Source/WebCore/platform/graphics/texmap/TextureMapperLayer3DRenderingContext.cpp A Source/WebCore/platform/graphics/texmap/TextureMapperLayer3DRenderingContext.h M Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp M Source/WebCore/platform/graphics/transforms/TransformationMatrix.h Log Message: ----------- [TextureMapper] Fix preserve-3D intersection rendering https://bugs.webkit.org/show_bug.cgi?id=282682 Reviewed by Fujii Hironori. Preserve-3d does not correctly render intersections, and also applying filters in a 3D scene can break the rendering order. This patch addresses these issues by implementing the composition and painting logic from the CSS Transforms Module Level 2. In a 3D rendering context, rendering and sorting of elements is done as follows: 1. The element establishing the 3D rendering context, and each other 3D transformed element participating in the 3D rendering context, is rendered into its own plane. This plane includes the element’s backgrounds, borders, other box decorations, content, and descendant elements, excluding any descendant elements that have their own plane (and their descendants). This rendering is done according to CSS 2.1,Appendix E, Section E.2 Painting Order. 2. Intersection is performed between this set of planes, according to Newell’s algorithm, with the planes transformed by the accumulated 3D transformation matrix. Coplanar 3D transformed elements are rendered in painting order. * Source/WebCore/platform/TextureMapper.cmake: * Source/WebCore/platform/graphics/texmap/FloatPlane3D.cpp: Added. (WebCore::FloatPlane3D::FloatPlane3D): * Source/WebCore/platform/graphics/texmap/FloatPlane3D.h: Added. (WebCore::FloatPlane3D::normal const): (WebCore::FloatPlane3D::distanceConstant const): (WebCore::FloatPlane3D::distanceToPoint const): * Source/WebCore/platform/graphics/texmap/FloatPolygon3D.cpp: Added. (WebCore::FloatPolygon3D::FloatPolygon3D): (WebCore::FloatPolygon3D::split const): * Source/WebCore/platform/graphics/texmap/FloatPolygon3D.h: Added. (WebCore::FloatPolygon3D::vertexAt const): (WebCore::FloatPolygon3D::numberOfVertices const): (WebCore::FloatPolygon3D::normal const): * Source/WebCore/platform/graphics/texmap/TextureMapper.cpp: (WebCore::TextureMapper::beginClip): * Source/WebCore/platform/graphics/texmap/TextureMapper.h: * Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::computeTransformsRecursive): (WebCore::TextureMapperLayer::paintSelf): (WebCore::TextureMapperLayer::paintWith3DRenderingContext): (WebCore::TextureMapperLayer::collect3DSceneLayers): (WebCore::TextureMapperLayer::effectiveLayerRect const): (WebCore::TextureMapperLayer::paintPreserves3DHolePunch): Deleted. (WebCore::TextureMapperLayer::sortByZOrder): Deleted. * Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h: (WebCore::TextureMapperLayer::toSurfaceTransform const): * Source/WebCore/platform/graphics/texmap/TextureMapperLayer3DRenderingContext.cpp: Added. (WebCore::TextureMapperLayer3DRenderingContext::paint): (WebCore::TextureMapperLayer3DRenderingContext::buildTree): (WebCore::TextureMapperLayer3DRenderingContext::traverseTreeAndPaint): (WebCore::TextureMapperLayer3DRenderingContext::classifyPolygon): * Source/WebCore/platform/graphics/texmap/TextureMapperLayer3DRenderingContext.h: Added. * Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::transpose const): * Source/WebCore/platform/graphics/transforms/TransformationMatrix.h: Canonical link: https://commits.webkit.org/286605@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