Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b64ace980799e0c233591c32097c537ed1ccb725
      
https://github.com/WebKit/WebKit/commit/b64ace980799e0c233591c32097c537ed1ccb725
  Author: Antoine Quint <[email protected]>
  Date:   2025-11-05 (Wed, 05 Nov 2025)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/mac-wk2/TestExpectations
    A 
LayoutTests/webanimations/threaded-animations/scroll-driven-animations-expected.txt
    A 
LayoutTests/webanimations/threaded-animations/scroll-driven-animations.html
    M Source/WebCore/animation/AnimationTimeline.cpp
    M Source/WebCore/animation/KeyframeEffect.cpp
    M Source/WebCore/animation/ScrollTimeline.cpp
    M Source/WebCore/animation/ScrollTimeline.h
    M Source/WebCore/platform/animation/AcceleratedEffect.cpp

  Log Message:
  -----------
  [threaded-animations] opt animations associated with progress-based timelines 
into acceleration
https://bugs.webkit.org/show_bug.cgi?id=301934
rdar://164009759

Reviewed by Dean Jackson.

In 302282@main we added the code to allow progress-based timelines to be 
uploaded to the remote
layer tree, but we didn't have any code that would actually make use of this 
new facility.

Working towards the goal of having qualifying scroll-driven animations being 
resolved in the
remote layer tree on Cocoa ports, we take another step by allowing effects 
associated with a
ready [0] animation to be accelerated – if the recently-introduced 
`ThreadedScrollDrivenAnimationsEnabled`
flag is indeed enabled.

We also override the `AnimationTimeline::createAcceleratedRepresentation()` 
method on
`ScrollTimeline` to provide the correct metrics for both scroll and view 
timelines, which
is a requirement of the threaded animations code.

Note that this code only works with CSS Animations, a followup patch will also 
enable this for
JS-originated scroll-driven animations.

[0] https://drafts.csswg.org/web-animations-1/#ready

Test: webanimations/threaded-animations/scroll-driven-animations.html

* LayoutTests/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* 
LayoutTests/webanimations/threaded-animations/scroll-driven-animations-expected.txt:
 Added.
* LayoutTests/webanimations/threaded-animations/scroll-driven-animations.html: 
Added.
* Source/WebCore/animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::createAcceleratedRepresentation):
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::canBeAccelerated const):
* Source/WebCore/animation/ScrollTimeline.cpp:
(WebCore::ScrollTimeline::createAcceleratedRepresentation):
* Source/WebCore/animation/ScrollTimeline.h:
* Source/WebCore/platform/animation/AcceleratedEffect.cpp:
(WebCore::AcceleratedEffect::AcceleratedEffect):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to