Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 28045a5b27fe38ad7b575025db2d810e27bce7c3
https://github.com/WebKit/WebKit/commit/28045a5b27fe38ad7b575025db2d810e27bce7c3
Author: Antoine Quint <[email protected]>
Date: 2025-11-22 (Sat, 22 Nov 2025)
Changed paths:
A
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-different-accelerated-property-expected.txt
A
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-different-accelerated-property.html
A
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-same-accelerated-property-dynamic-expected.txt
A
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-same-accelerated-property-dynamic.html
A
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-same-accelerated-property-expected.txt
A
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-same-accelerated-property.html
M
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations.html
M LayoutTests/webanimations/threaded-animations/threaded-animations-utils.js
M Source/WebCore/animation/AcceleratedEffectStackUpdater.cpp
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffectStack.cpp
M Source/WebCore/rendering/RenderLayerBacking.cpp
Log Message:
-----------
[threaded-animations] disable accelerated animations if threaded and
non-threaded animations animate the same underlying property
https://bugs.webkit.org/show_bug.cgi?id=302856
rdar://165120183
Reviewed by Simon Fraser.
Until we have monotonic and scroll-driven animations all accelerated in the
remote layer tree, we need
to ensure the different accelerated approaches can coexist. This means that in
the case where a monotonic
and a scroll-driven animation both target the same underlying property, we need
to disable accelerated
animations altogether.
To that end, we extend `KeyframeEffectStack::allowsAcceleration()` to identify
such cases and return false.
Then, in `RenderLayerBacking::updateAcceleratedEffectsAndBaseValues()` we
simply ignore targets with an
associated effect stack that is marked as such.
To test this is implemented correctly, we add tests that have two animations
that can be accelerated specified
on the same element. In one test, these two animations target different
properties and thus allow acceleration
with mixed types. In the other test, these two animations target the same
underlying property and thus disallow
acceleration of both types.
Tests:
webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-different-accelerated-property.html
webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-same-accelerated-property-dynamic.html
webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-same-accelerated-property.html
*
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-different-accelerated-property-expected.txt:
Added.
*
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-different-accelerated-property.html:
Added.
*
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-same-accelerated-property-dynamic-expected.txt:
Added.
*
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-same-accelerated-property-dynamic.html:
Added.
*
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-same-accelerated-property-expected.txt:
Added.
*
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations-on-same-element-for-same-accelerated-property.html:
Added.
*
LayoutTests/webanimations/threaded-animations/threaded-and-non-threaded-animations.html:
* LayoutTests/webanimations/threaded-animations/threaded-animations-utils.js:
* Source/WebCore/animation/AcceleratedEffectStackUpdater.cpp:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::effectStackNoLongerAllowsAccelerationDuringAcceleratedActionApplication):
* Source/WebCore/animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::allowsAcceleration const):
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAcceleratedEffectsAndBaseValues):
Canonical link: https://commits.webkit.org/303444@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications