[webkit-changes] [WebKit/WebKit] 7d3beb: Cleanup / optimize InteractionRegion layers updates

Commit Queue noreply at github.com
Sun Mar 26 13:27:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7d3bebcc9fa4ccadd6c850c79e39994a274997d0
      https://github.com/WebKit/WebKit/commit/7d3bebcc9fa4ccadd6c850c79e39994a274997d0
  Author: Etienne Segonzac <sgz at apple.com>
  Date:   2023-03-26 (Sun, 26 Mar 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.mm

  Log Message:
  -----------
  Cleanup / optimize InteractionRegion layers updates
https://bugs.webkit.org/show_bug.cgi?id=254409
<rdar://105196721>

Reviewed by Tim Horton.

Limit the number of CA operations we make while updating the
InteractionRegions part of the RemoteLayerTree.

* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
Only re-parent the root InteractionRegion layer when the rootNode changes
or changes hierarchy.

* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.mm:
(WebKit::interactionRegionTypeForLayer):
(WebKit::isInteractionLayer):
(WebKit::isOcclusionLayer):
(WebKit::isAnyInteractionRegionLayer):
(WebKit::setInteractionRegion):
(WebKit::setInteractionRegionOcclusion):
Store the InteractionRegion type on the layer to simplify the
type-dependant logic.

(WebKit::interactionRegionGroupNameForLayer):
(WebKit::interactionRegionForLayer): Deleted.
(WebKit::interactionRegionGroupNameForRegion):
(WebKit::updateLayersForInteractionRegions):
Only re-parent an existing layer if it moved.
Only re-configure an Interaction layer if the groupName changed.

* Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:
(dumpCALayer):
Update the Interaction/Occlusion detection logic with the new keys.

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




More information about the webkit-changes mailing list