-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reuse InteractionRegion layers when an element is resized
https://bugs.webkit.org/show_bug.cgi?id=260078 <rdar://112930285> Reviewed by Tim Horton and Mike Wyrzykowski. We currently only reuse InteractionRegions layers based on their frame. This patch adds the ability to reuse layers when an element is resized or moved. * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.mm: (WebKit::setInteractionRegion): Deleted. (WebKit::setInteractionRegionOcclusion): Deleted. (WebKit::setInteractionRegionGuard): Deleted. (WebKit::createInteractionRegionLayer): Extract the layer creation code in a single function for readability. (WebKit::configureRemoteEffect): Extract the remote effect configuration in a function for readibility. (WebKit::applyBackgroundColorForDebuggingToLayer): Extract the debug layer configuration to a function for readability. (WebKit::interactionRegionTypeForLayer): (WebKit::interactionRegionGroupNameForRegion): (WebKit::interactionRegionGroupNameForLayer): (WebKit::isAnyInteractionRegionLayer): Style fix. Re-order functions. (WebKit::updateLayersForInteractionRegions): Keep track of existing layers that are not part of a multi-layer group effect for reuse. Move the layer reuse / creation code to a lambda to use early returns and improve readability. Add the new `groupName` based reuse code path. Clarify the conditions under which we update properties on the InteractionRegion layer. * LayoutTests/interaction-region/layer-tree.html: Make sure all branches of the `updateLayersForInteractionRegions()` get exercised during the test. * LayoutTests/interaction-region/interaction-layers-culling-expected.txt: * LayoutTests/interaction-region/layer-tree-expected.txt: Reset and update test expectations (something changed below us). Canonical link: https://commits.webkit.org/266945@main
- Loading branch information
1 parent
a5a18a2
commit 3f543a9
Showing
4 changed files
with
548 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.