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

Antti Koivisto noreply at github.com
Wed Jun 28 02:05:01 PDT 2023


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

  Changed paths:
    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/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

  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 for overflow scroll layers as long as
they don't overlap. This helps layer explosion on walmart.com.

Compared to the previous reverted version this patch limits the scope by only allowing scroll layers
as providers in the multi-provider case. This avoids large provider pile-ups in normal layer case.
Scroll layers also have overflow clip making their overlap testing simple.

* LayoutTests/compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt:
* LayoutTests/compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-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::startBackingSharingSequence):
(WebCore::RenderLayerCompositor::BackingSharingState::continueBackingSharingSequence):

Append a new provider.

(WebCore::RenderLayerCompositor::BackingSharingState::endBackingSharingSequence):
(WebCore::RenderLayerCompositor::BackingSharingState::backingProviderCandidateForLayer):
(WebCore::RenderLayerCompositor::BackingSharingState::backingProviderForLayer):
(WebCore::RenderLayerCompositor::BackingSharingState::canUseMultipleProviders const):

Limit to overflow scrollers for now. These have overflow clip and are cheap to overlap test.

(WebCore::RenderLayerCompositor::BackingSharingState::updateBeforeDescendantTraversal):

Allow the sequence to continue if we find another non-overlapping scrolling layer.
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::isPotentialBackingSharingLayer const): Deleted.
(WebCore::RenderLayerCompositor::BackingSharingState::canIncludeLayer const): Deleted.
* Source/WebCore/rendering/RenderLayerCompositor.h:

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




More information about the webkit-changes mailing list