[webkit-changes] [WebKit/WebKit] 3311ab: [web-animations] update accelerated animations for...
Antoine Quint
noreply at github.com
Fri Mar 3 00:51:33 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3311ab9ea59bc6e0016d64581faaf93ff7907ec7
https://github.com/WebKit/WebKit/commit/3311ab9ea59bc6e0016d64581faaf93ff7907ec7
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/rendering/RenderLayerBacking.cpp
M Source/WebCore/rendering/RenderLayerBacking.h
Log Message:
-----------
[web-animations] update accelerated animations for a RenderLayerBacking
https://bugs.webkit.org/show_bug.cgi?id=253242
Reviewed by Dean Jackson.
Go through the keyframe effect stack associated with a RenderLayerBacking and convert
those effects to accelerated effects provided they can be accelerated. In case we only
find effects that aren't marked as "running", which means they won't produce an interpolated
value that changes over time, we do *not* yield accelerated effects. This means that suspended
or paused animations will not be accelerated unless there are other effects in the stack that
rely on them to produce an interpolated value.
To support this, we change the implementations of KeyframeEffect::canBeAccelerated() and
KeyframeEffect::isRunningAccelerated() when threaded animation resolution is enabled. In this
scenario there are fewer restrictions on the type of animations that can be accelerated, and
we also enforce the "running" state of the associated WebAnimation.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::isRunningAccelerated const):
(WebCore::KeyframeEffect::canBeAccelerated const):
* Source/WebCore/animation/KeyframeEffect.h:
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAcceleratedEffectsAndBaseValues):
* Source/WebCore/rendering/RenderLayerBacking.h:
Canonical link: https://commits.webkit.org/261120@main
More information about the webkit-changes
mailing list