[webkit-changes] [WebKit/WebKit] e89a58: [threaded-animation-resolution] Schedule animation...

mattwoodrow noreply at github.com
Sat Feb 3 23:36:10 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e89a58c3716a2cee16351e230a760ed8e8e0358e
      https://github.com/WebKit/WebKit/commit/e89a58c3716a2cee16351e230a760ed8e8e0358e
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2024-02-03 (Sat, 03 Feb 2024)

  Changed paths:
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteAcceleratedEffectStack.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteAcceleratedEffectStack.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeDrawingAreaProxyIOS.h
    M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeDrawingAreaProxyIOS.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h
    M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm

  Log Message:
  -----------
  [threaded-animation-resolution] Schedule animation updates from RemoteScrollingCoordinatorProxy on the main thread
https://bugs.webkit.org/show_bug.cgi?id=268282
rdar://121839192

Reviewed by Simon Fraser.

In 273391 at main we added support for scheduling animation resolution for macOS via RemoteLayerTreeEventDispatcher.
On iOS, where we don't use a scrolling thread, we schedule animations through RemoteScrollingCoordinatorProxy
using a dedicated CADisplayLink in a new WKAnimationDisplayLinkHandler. When that display link fires, we resolve
animations on the main thread by calling the new RemoteAcceleratedEffectStack::applyEffectsFromMainThread().

* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAcceleratedEffectStack.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAcceleratedEffectStack.mm:
(WebKit::RemoteAcceleratedEffectStack::applyEffectsFromMainThread const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
(WebKit::RemoteLayerTreeNode::setAcceleratedEffectsAndBaseValues):
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h:
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(-[WKAnimationDisplayLinkHandler initWithCoordinator:]):
(-[WKAnimationDisplayLinkHandler dealloc]):
(-[WKAnimationDisplayLinkHandler displayLinkFired:]):
(-[WKAnimationDisplayLinkHandler invalidate]):
(-[WKAnimationDisplayLinkHandler schedule]):
(-[WKAnimationDisplayLinkHandler pause]):
(WebKit::RemoteScrollingCoordinatorProxyIOS::~RemoteScrollingCoordinatorProxyIOS):
(WebKit::RemoteScrollingCoordinatorProxyIOS::animationsWereAddedToNode):
(WebKit::RemoteScrollingCoordinatorProxyIOS::animationsWereRemovedFromNode):
(WebKit::RemoteScrollingCoordinatorProxyIOS::updateAnimations):

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




More information about the webkit-changes mailing list