Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7b265b345c261337cd1148ee074baf3167a9e714
https://github.com/WebKit/WebKit/commit/7b265b345c261337cd1148ee074baf3167a9e714
Author: Vitaly Dyachkov <[email protected]>
Date: 2026-09-10 (Thu, 10 Sep 2026)
Changed paths:
M LayoutTests/platform/glib/TestExpectations
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp
M Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.h
Log Message:
-----------
[GTK][WPE] `steps()` and `linear()` animations can be accelerated
https://bugs.webkit.org/show_bug.cgi?id=323852
Reviewed by Carlos Garcia Campos.
`steps()` and `linear()` easing functions are currently excluded from
acceleration on all ports. This restriction only needs to apply to Apple
ports, because accelerated animations running on the compositor are
implemented using `CAMediaTimingFunction`, which cannot fully represent
them. GTK and WPE use `TextureMapperAnimation`, which doesn't have this
limitation, so these animations can be accelerated there.
`TextureMapperAnimation` kept a single `m_timingFunction` field for two
different things — the overall timing function of a Web Animation, and
the CSS Animation's `animation-timing-function`, which only acts as a
fallback for keyframes that don't specify their own easing.
Because of this, that fallback easing could be applied to the whole
animation progress instead of just to the individual keyframe interval,
which produces the wrong `steps()`/`linear()` results.
`TextureMapperAnimation` now keeps the fallback as a separate
`m_defaultTimingFunctionForKeyframes` field, and a new
`timingFunctionForKeyframe()` helper applies it only where it's supposed
to.
Test: webanimations/transform-animation-with-steps-timing-function.html
Removed
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::canBeAccelerated const):
(WebCore::KeyframeEffect::updateAcceleratedActions):
* Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:
(WebCore::timingFunctionIsIdentity):
(WebCore::TextureMapperAnimation::TextureMapperAnimation):
(WebCore::TextureMapperAnimation::operator=):
(WebCore::TextureMapperAnimation::apply):
(WebCore::TextureMapperAnimation::applyTimingFunctionForKeyframe const):
(WebCore::timingFunctionForAnimationValue): Deleted.
(WebCore::TextureMapperAnimation::timingFunctionForKeyframe const):
* Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.h:
* LayoutTests/platform/glib/TestExpectations:
Canonical link: https://commits.webkit.org/320878@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications