[webkit-changes] [WebKit/WebKit] c1d07b: Allow multiple providers in a backing sharing sequ...

Antti Koivisto noreply at github.com
Wed Jun 14 23:28:39 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c1d07b738c50f0a8a9230671117390a89389888f
      https://github.com/WebKit/WebKit/commit/c1d07b738c50f0a8a9230671117390a89389888f
  Author: Antti Koivisto <antti at apple.com>
  Date:   2023-06-14 (Wed, 14 Jun 2023)

  Changed paths:
    M LayoutTests/compositing/iframes/page-cache-layer-tree-expected.txt
    M LayoutTests/compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt
    M LayoutTests/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt
    M LayoutTests/fast/repaint/background-attachment-fixed-in-composited-scroll-expected.txt
    M LayoutTests/fast/repaint/background-attachment-fixed-in-composited-scroll.html
    M LayoutTests/platform/ios-wk2/compositing/iframes/page-cache-layer-tree-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt
    M LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll-expected.txt
    M LayoutTests/scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll-expected.txt
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.h
    R resources/js-wrapper.png
    R resources/webkit2-process-architecture.png
    R resources/xcode-add-file.png
    R resources/xcode-build-settings-for-run.png
    R resources/xcode-export-header.png
    R resources/xcode-scheme-dumprendertree.png
    R resources/xcode-scheme-layout-test.png
    R resources/xcode-workspace-build-location.png
    R resources/xcode-workspace-settings.png

  Log Message:
  -----------
  Allow multiple providers in a backing sharing sequence
https://bugs.webkit.org/show_bug.cgi?id=258071
rdar://84376322

Reviewed by Simon Fraser.

Currently there can be exactly one backing provider layer within a stacking context.
With this patch we allow multiple providers as long as long as they don't overlap.

This enables backing sharing in the case of multiple overflow scrollers within a single
stacking context, as seen on walmart.com.

* LayoutTests/compositing/iframes/page-cache-layer-tree-expected.txt:
* LayoutTests/compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt:
* LayoutTests/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt:
* LayoutTests/fast/repaint/background-attachment-fixed-in-composited-scroll-expected.txt:
* LayoutTests/fast/repaint/background-attachment-fixed-in-composited-scroll.html:
* LayoutTests/platform/ios-wk2/compositing/iframes/page-cache-layer-tree-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt:
* LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll-expected.txt:
* LayoutTests/scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll-expected.txt:

Various test results change because more backing sharing. Visually the results are identical.

* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::BackingSharingState::backingProviderCandidates const):

Sharing layers are now tracked per-provider.

(WebCore::RenderLayerCompositor::BackingSharingState::isPotentialBackingSharingLayer const):
(WebCore::RenderLayerCompositor::BackingSharingState::startOrContinueBackingSharingSequence):

Append a new provider.

(WebCore::RenderLayerCompositor::BackingSharingState::endBackingSharingSequence):
(WebCore::RenderLayerCompositor::BackingSharingState::backingProviderCandidateForLayer):
(WebCore::RenderLayerCompositor::BackingSharingState::updateBeforeDescendantTraversal):

Allow the sequence to continue even if we find another compositing layer as long as it doesn't overlap with
the existing providers. If applicable it will become an additional provider later.

(WebCore::RenderLayerCompositor::BackingSharingState::updateAfterDescendantTraversal):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
(WebCore::RenderLayerCompositor::layerRepaintTargetsBackingSharingLayer const):
(WebCore::operator<<):
(WebCore::RenderLayerCompositor::BackingSharingState::backingProviderCandidate const): Deleted.
(WebCore::RenderLayerCompositor::BackingSharingState::appendSharingLayer): Deleted.
(WebCore::RenderLayerCompositor::BackingSharingState::startBackingSharingSequence): Deleted.
(WebCore::RenderLayerCompositor::BackingSharingState::canIncludeLayer const): Deleted.
* Source/WebCore/rendering/RenderLayerCompositor.h:

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




More information about the webkit-changes mailing list