Skip to content

Conversation

carlosgcampos
Copy link
Contributor

@carlosgcampos carlosgcampos commented Dec 12, 2024

d81c1b2

[CoordinatedGraphics] Use CoordinatedPlatformLayer in async scrolling
https://bugs.webkit.org/show_bug.cgi?id=284518

Reviewed by Alejandro G. Castro.

* Source/WebCore/page/scrolling/ScrollingPlatformLayer.h:
* Source/WebCore/page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::isScrollingTreeNicosia const):
* Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
(WebCore::ScrollingCoordinatorNicosia::didCompletePlatformRenderingUpdate):
* Source/WebCore/page/scrolling/nicosia/ScrollingStateNodeNicosia.cpp:
(WebCore::LayerRepresentation::makePlatformLayerTyped):
(WebCore::LayerRepresentation::makePlatformLayerTypeless):
(WebCore::LayerRepresentation::platformLayerFromGraphicsLayer):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFixedNodeNicosia.cpp:
(WebCore::ScrollingTreeFixedNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreeFixedNodeNicosia::applyLayerPositions):
(WebCore::ScrollingTreeFixedNodeNicosia::dumpProperties const):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFixedNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionScrollingLayers):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionRelatedLayers):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.cpp:
(WebCore::ScrollingTreeNicosia::applyLayerPositionsInternal):
(WebCore::ScrollingTreeNicosia::didCompleteRenderingUpdate):
(WebCore::ScrollingTreeNicosia::didCompletePlatformRenderingUpdate):
(WebCore::collectDescendantLayersAtPoint):
(WebCore::ScrollingTreeNicosia::scrollingNodeForPoint):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNodeNicosia.cpp:
(WebCore::ScrollingTreeOverflowScrollProxyNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreeOverflowScrollProxyNodeNicosia::applyLayerPositions):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::repositionScrollingLayers):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreePositionedNodeNicosia.cpp:
(WebCore::ScrollingTreePositionedNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreePositionedNodeNicosia::applyLayerPositions):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreePositionedNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeStickyNodeNicosia.cpp:
(WebCore::ScrollingTreeStickyNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreeStickyNodeNicosia::applyLayerPositions):
(WebCore::ScrollingTreeStickyNodeNicosia::layerTopLeft const):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeStickyNodeNicosia.h:
* Source/WebCore/platform/SourcesNicosia.txt:
* Source/WebCore/platform/TextureMapper.cmake:
* Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:
(Nicosia::PlatformLayer::setSceneIntegration): Deleted.
(Nicosia::PlatformLayer::createUpdateScope): Deleted.
* Source/WebCore/platform/graphics/nicosia/NicosiaSceneIntegration.cpp: Removed.
* Source/WebCore/platform/graphics/nicosia/NicosiaSceneIntegration.h: Removed.
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp:
(WebCore::CoordinatedPlatformLayer::setPositionForScrolling):
(WebCore::CoordinatedPlatformLayer::setTopLeftPositionForScrolling):
(WebCore::CoordinatedPlatformLayer::topLeftPositionForScrolling):
(WebCore::CoordinatedPlatformLayer::setBoundsOriginForScrolling):
(WebCore::CoordinatedPlatformLayer::bounds const):
(WebCore::CoordinatedPlatformLayer::setScrollingNodeID):
(WebCore::CoordinatedPlatformLayer::scrollingNodeID const):
(WebCore::CoordinatedPlatformLayer::children const):
(WebCore::CoordinatedPlatformLayer::eventRegion const):
(WebCore::CoordinatedPlatformLayer::isCompositionRequiredOrOngoing const):
(WebCore::CoordinatedPlatformLayer::requestComposition):
(WebCore::CoordinatedPlatformLayer::syncPosition): Deleted.
(WebCore::CoordinatedPlatformLayer::syncBoundsOrigin): Deleted.
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h:
* Source/WebCore/platform/graphics/texmap/coordinated/GraphicsLayerCoordinated.cpp:
(WebCore::GraphicsLayerCoordinated::syncPosition):
(WebCore::GraphicsLayerCoordinated::syncBoundsOrigin):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingRunLoop.cpp:
(WebKit::CompositingRunLoop::isActive):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingRunLoop.h:
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::LayerTreeHost):
(WebKit::LayerTreeHost::~LayerTreeHost):
(WebKit::LayerTreeHost::attachLayer):
(WebKit::LayerTreeHost::detachLayer):
(WebKit::LayerTreeHost::notifyCompositionRequired):
(WebKit::LayerTreeHost::isCompositionRequiredOrOngoing const):
(WebKit::LayerTreeHost::requestComposition):
(WebKit::LayerTreeHost::requestUpdate): Deleted.
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::isActive const):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.h:

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

add827c

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ❌ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2
✅ 🛠 🧪 unsafe-merge ✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@carlosgcampos carlosgcampos self-assigned this Dec 12, 2024
@carlosgcampos carlosgcampos added the Platform Portability improvements and other general platform improvements not driven directly by site bugs. label Dec 12, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Dec 12, 2024
@carlosgcampos carlosgcampos removed the merging-blocked Applied to prevent a change from being merged label Dec 13, 2024
Copy link
Contributor

@alexgcastro alexgcastro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Next step to the graphics layer refactor done!

@carlosgcampos carlosgcampos added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Dec 14, 2024
https://bugs.webkit.org/show_bug.cgi?id=284518

Reviewed by Alejandro G. Castro.

* Source/WebCore/page/scrolling/ScrollingPlatformLayer.h:
* Source/WebCore/page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::isScrollingTreeNicosia const):
* Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
(WebCore::ScrollingCoordinatorNicosia::didCompletePlatformRenderingUpdate):
* Source/WebCore/page/scrolling/nicosia/ScrollingStateNodeNicosia.cpp:
(WebCore::LayerRepresentation::makePlatformLayerTyped):
(WebCore::LayerRepresentation::makePlatformLayerTypeless):
(WebCore::LayerRepresentation::platformLayerFromGraphicsLayer):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFixedNodeNicosia.cpp:
(WebCore::ScrollingTreeFixedNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreeFixedNodeNicosia::applyLayerPositions):
(WebCore::ScrollingTreeFixedNodeNicosia::dumpProperties const):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFixedNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionScrollingLayers):
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionRelatedLayers):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.cpp:
(WebCore::ScrollingTreeNicosia::applyLayerPositionsInternal):
(WebCore::ScrollingTreeNicosia::didCompleteRenderingUpdate):
(WebCore::ScrollingTreeNicosia::didCompletePlatformRenderingUpdate):
(WebCore::collectDescendantLayersAtPoint):
(WebCore::ScrollingTreeNicosia::scrollingNodeForPoint):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNodeNicosia.cpp:
(WebCore::ScrollingTreeOverflowScrollProxyNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreeOverflowScrollProxyNodeNicosia::applyLayerPositions):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::repositionScrollingLayers):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreePositionedNodeNicosia.cpp:
(WebCore::ScrollingTreePositionedNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreePositionedNodeNicosia::applyLayerPositions):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreePositionedNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeStickyNodeNicosia.cpp:
(WebCore::ScrollingTreeStickyNodeNicosia::commitStateBeforeChildren):
(WebCore::ScrollingTreeStickyNodeNicosia::applyLayerPositions):
(WebCore::ScrollingTreeStickyNodeNicosia::layerTopLeft const):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeStickyNodeNicosia.h:
* Source/WebCore/platform/SourcesNicosia.txt:
* Source/WebCore/platform/TextureMapper.cmake:
* Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:
(Nicosia::PlatformLayer::setSceneIntegration): Deleted.
(Nicosia::PlatformLayer::createUpdateScope): Deleted.
* Source/WebCore/platform/graphics/nicosia/NicosiaSceneIntegration.cpp: Removed.
* Source/WebCore/platform/graphics/nicosia/NicosiaSceneIntegration.h: Removed.
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp:
(WebCore::CoordinatedPlatformLayer::setPositionForScrolling):
(WebCore::CoordinatedPlatformLayer::setTopLeftPositionForScrolling):
(WebCore::CoordinatedPlatformLayer::topLeftPositionForScrolling):
(WebCore::CoordinatedPlatformLayer::setBoundsOriginForScrolling):
(WebCore::CoordinatedPlatformLayer::bounds const):
(WebCore::CoordinatedPlatformLayer::setScrollingNodeID):
(WebCore::CoordinatedPlatformLayer::scrollingNodeID const):
(WebCore::CoordinatedPlatformLayer::children const):
(WebCore::CoordinatedPlatformLayer::eventRegion const):
(WebCore::CoordinatedPlatformLayer::isCompositionRequiredOrOngoing const):
(WebCore::CoordinatedPlatformLayer::requestComposition):
(WebCore::CoordinatedPlatformLayer::syncPosition): Deleted.
(WebCore::CoordinatedPlatformLayer::syncBoundsOrigin): Deleted.
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h:
* Source/WebCore/platform/graphics/texmap/coordinated/GraphicsLayerCoordinated.cpp:
(WebCore::GraphicsLayerCoordinated::syncPosition):
(WebCore::GraphicsLayerCoordinated::syncBoundsOrigin):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingRunLoop.cpp:
(WebKit::CompositingRunLoop::isActive):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingRunLoop.h:
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::LayerTreeHost):
(WebKit::LayerTreeHost::~LayerTreeHost):
(WebKit::LayerTreeHost::attachLayer):
(WebKit::LayerTreeHost::detachLayer):
(WebKit::LayerTreeHost::notifyCompositionRequired):
(WebKit::LayerTreeHost::isCompositionRequiredOrOngoing const):
(WebKit::LayerTreeHost::requestComposition):
(WebKit::LayerTreeHost::requestUpdate): Deleted.
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::isActive const):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.h:

Canonical link: https://commits.webkit.org/287835@main
@webkit-commit-queue webkit-commit-queue force-pushed the coord-graphics-platform-layer-async-scrolling branch from add827c to d81c1b2 Compare December 14, 2024 08:56
@webkit-commit-queue
Copy link
Collaborator

Committed 287835@main (d81c1b2): https://commits.webkit.org/287835@main

Reviewed commits have been landed. Closing PR #37825 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit d81c1b2 into WebKit:main Dec 14, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Dec 14, 2024
@carlosgcampos carlosgcampos deleted the coord-graphics-platform-layer-async-scrolling branch December 14, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Platform Portability improvements and other general platform improvements not driven directly by site bugs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants