Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 385433adbb4243049dda8504060ef3c72909af06
https://github.com/WebKit/WebKit/commit/385433adbb4243049dda8504060ef3c72909af06
Author: Antoine Quint <[email protected]>
Date: 2025-10-16 (Thu, 16 Oct 2025)
Changed paths:
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimation.cpp
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimation.h
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationStack.h
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationStack.mm
A Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimeline.cpp
A Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimeline.h
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
M
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h
M
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
M
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h
M
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.mm
M
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.h
M
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
Log Message:
-----------
[threaded-animation-resolution] use a timeline to update remote animations
https://bugs.webkit.org/show_bug.cgi?id=300778
rdar://162666323
Reviewed by Simon Fraser.
We used to save the origin time passed through the remote layer tree
transaction onto each
remote animation stack to be able to compute the current time of each animation
as time
progressed and we updated animations.
In preparation for the support of multiple timeline types (such as scroll
timelines) we introduce
a remote monotonic timeline, stored on the `RemoteLayerTreeEventDispatcher` for
macOS and
the `RemoteScrollingCoordinatorProxyIOS` for iOS keyed by process identifier.
That timeline is
created in `RemoteLayerTreeHost::updateLayerTree()`.
Then, as we create the remote animations under
`RemoteLayerTreeNode::setAcceleratedEffectsAndBaseValues()`,
we provide them with the timeline obtained through the `RemoteLayerTreeHost`.
As time progresses,
the new monotonic time is passed onto the timeline to update its current time
and animations
just query their timeline's current time to apply their effect.
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimation.cpp:
(WebKit::RemoteAnimation::create):
(WebKit::RemoteAnimation::RemoteAnimation):
(WebKit::RemoteAnimation::apply):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimation.h:
(WebKit::RemoteAnimation::timeline const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationStack.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationStack.mm:
(WebKit::RemoteAnimationStack::create):
(WebKit::RemoteAnimationStack::RemoteAnimationStack):
(WebKit::RemoteAnimationStack::initEffectsFromMainThread):
(WebKit::RemoteAnimationStack::applyEffectsFromScrollingThread const):
(WebKit::RemoteAnimationStack::applyEffectsFromMainThread const):
(WebKit::RemoteAnimationStack::computeValues const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimeline.cpp: Copied
from Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimation.cpp.
(WebKit::computeCurrentTime):
(WebKit::RemoteAnimationTimeline::create):
(WebKit::RemoteAnimationTimeline::RemoteAnimationTimeline):
(WebKit::RemoteAnimationTimeline::updateCurrentTime):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimeline.h: Copied
from Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimation.cpp.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTreeTransaction):
(WebKit::RemoteLayerTreeDrawingAreaProxy::registerTimelineIfNecessary):
(WebKit::RemoteLayerTreeDrawingAreaProxy::timeline const):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedTimelineTimeOrigin const):
Deleted.
(WebKit::RemoteLayerTreeDrawingAreaProxy::animationCurrentTime const): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
(WebKit::RemoteLayerTreeHost::timeline const):
(WebKit::RemoteLayerTreeHost::acceleratedTimelineTimeOrigin const): Deleted.
(WebKit::RemoteLayerTreeHost::animationCurrentTime const): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
(WebKit::RemoteLayerTreeNode::setAcceleratedEffectsAndBaseValues):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
(WebKit::RemoteScrollingCoordinatorProxy::registerTimelineIfNecessary):
(WebKit::RemoteScrollingCoordinatorProxy::updateTimelineCurrentTime):
(WebKit::RemoteScrollingCoordinatorProxy::timeline const):
*
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h:
*
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxyIOS::registerTimelineIfNecessary):
(WebKit::RemoteScrollingCoordinatorProxyIOS::updateTimelineCurrentTime):
(WebKit::RemoteScrollingCoordinatorProxyIOS::timeline const):
(WebKit::RemoteScrollingCoordinatorProxyIOS::updateAnimations):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.mm:
(WebKit::RemoteLayerTreeEventDispatcher::registerTimelineIfNecessary):
(WebKit::RemoteLayerTreeEventDispatcher::updateTimelineCurrentTime):
(WebKit::RemoteLayerTreeEventDispatcher::timeline const):
(WebKit::RemoteLayerTreeEventDispatcher::updateAnimations):
*
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.h:
*
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm:
(WebKit::RemoteScrollingCoordinatorProxyMac::registerTimelineIfNecessary):
(WebKit::RemoteScrollingCoordinatorProxyMac::updateTimelineCurrentTime):
(WebKit::RemoteScrollingCoordinatorProxyMac::timeline const):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
Canonical link: https://commits.webkit.org/301615@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes