[webkit-changes] [WebKit/WebKit] 9d57f1: REGRESSION (iOS 17): Animation flicker with multip...
Antoine Quint
noreply at github.com
Wed Mar 6 22:27:16 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9d57f1f6519a812dda9dbb476a24ce8ed73c976c
https://github.com/WebKit/WebKit/commit/9d57f1f6519a812dda9dbb476a24ce8ed73c976c
Author: Antoine Quint <graouts at webkit.org>
Date: 2024-03-06 (Wed, 06 Mar 2024)
Changed paths:
M LayoutTests/platform/glib/TestExpectations
A LayoutTests/webanimations/accelerated-animation-immediate-prevetion-direction-reverse-expected.txt
A LayoutTests/webanimations/accelerated-animation-immediate-prevetion-direction-reverse.html
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/animation/KeyframeEffectStack.cpp
Log Message:
-----------
REGRESSION (iOS 17): Animation flicker with multiple accelerated animations and direction change
https://bugs.webkit.org/show_bug.cgi?id=263996
rdar://117815004
Reviewed by Dean Jackson.
While we have a mechanism to deal with changes in ability to accelerate effects based on logic ran
at the KeyframeEffect level (see `KeyframeEffect::canBeAccelerated()`) we do not have anything
specific in place to deal with the inability to accelerate effects at the GraphicsLayerCA level.
In the case of reversed animations, or any playback rate other than 1, we reject acceleration
in GraphicsLayerCA in the static function `animationCanBeAccelerated()`. This happens while
accelerated actions are applied throughout a keyframe effect stack. With the existing system
in place, this would result in preventing acceleration in the next animation frame. This bug
showed this with animations being in an incorrect state for one single frame.
We now check in `KeyframeEffectStack::applyPendingAcceleratedActions()` whether the application
of pending accelerated actions resulted in an effect preventing acceleration of the effect
stack and now immediately stop all effects in that stack.
The newly added test would reliably fail prior to this patch.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/webanimations/accelerated-animation-immediate-prevetion-direction-reverse-expected.txt: Added.
* LayoutTests/webanimations/accelerated-animation-immediate-prevetion-direction-reverse.html: Added.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::effectStackNoLongerAllowsAccelerationDuringAcceleratedActionApplication):
* Source/WebCore/animation/KeyframeEffect.h:
* Source/WebCore/animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::applyPendingAcceleratedActions const):
Canonical link: https://commits.webkit.org/275773@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list