haikuwebkit/LayoutTests/animations/steps-transform-rendering-u...

7 lines
87 B
Plaintext
Raw Permalink Normal View History

steps() timing function on a transform animation triggers a render every frame https://bugs.webkit.org/show_bug.cgi?id=214712 <rdar://problem/62737868> Reviewed by Tim Horton. Source/WebCore: An animation of transform, with a steps() timing function, would schedule a rendering update on every frame. This happened because KeyframeEffect::updateAcceleratedActions() would keep trying, and failing to start the accelerated animation every frame, since GraphicsLayerCA refuses to run accelerated animations with steps timing functions. Fix by making m_isRunningAccelerated an Optional<>, which gets a value once we've tried to run the animation the first time. Also ensure that we re-try if the timing function changes, via animationDidChangeTimingProperties(). Test: animations/steps-transform-rendering-updates.html * animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::isRunningAcceleratedAnimationForProperty const): (WebCore::KeyframeEffect::updateAcceleratedActions): (WebCore::KeyframeEffect::animationDidChangeTimingProperties): (WebCore::KeyframeEffect::animationWasCanceled): (WebCore::KeyframeEffect::willChangeRenderer): (WebCore::KeyframeEffect::animationSuspensionStateDidChange): (WebCore::KeyframeEffect::applyPendingAcceleratedActions): * animation/KeyframeEffect.h: (WebCore::KeyframeEffect::isRunningAccelerated const): * page/Page.cpp: (WebCore::Page::startTrackingRenderingUpdates): (WebCore::Page::renderingUpdateCount const): (WebCore::Page::updateRendering): * page/Page.h: * testing/Internals.cpp: (WebCore::Internals::startTrackingRenderingUpdates): (WebCore::Internals::renderingUpdateCount): * testing/Internals.h: * testing/Internals.idl: LayoutTests: * animations/steps-transform-rendering-updates-expected.txt: Added. * animations/steps-transform-rendering-updates.html: Added. Canonical link: https://commits.webkit.org/227580@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-24 21:03:23 +00:00
PASS count is 0
PASS count < 6 is true
steps() timing function on a transform animation triggers a render every frame https://bugs.webkit.org/show_bug.cgi?id=214712 <rdar://problem/62737868> Reviewed by Tim Horton. Source/WebCore: An animation of transform, with a steps() timing function, would schedule a rendering update on every frame. This happened because KeyframeEffect::updateAcceleratedActions() would keep trying, and failing to start the accelerated animation every frame, since GraphicsLayerCA refuses to run accelerated animations with steps timing functions. Fix by making m_isRunningAccelerated an Optional<>, which gets a value once we've tried to run the animation the first time. Also ensure that we re-try if the timing function changes, via animationDidChangeTimingProperties(). Test: animations/steps-transform-rendering-updates.html * animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::isRunningAcceleratedAnimationForProperty const): (WebCore::KeyframeEffect::updateAcceleratedActions): (WebCore::KeyframeEffect::animationDidChangeTimingProperties): (WebCore::KeyframeEffect::animationWasCanceled): (WebCore::KeyframeEffect::willChangeRenderer): (WebCore::KeyframeEffect::animationSuspensionStateDidChange): (WebCore::KeyframeEffect::applyPendingAcceleratedActions): * animation/KeyframeEffect.h: (WebCore::KeyframeEffect::isRunningAccelerated const): * page/Page.cpp: (WebCore::Page::startTrackingRenderingUpdates): (WebCore::Page::renderingUpdateCount const): (WebCore::Page::updateRendering): * page/Page.h: * testing/Internals.cpp: (WebCore::Internals::startTrackingRenderingUpdates): (WebCore::Internals::renderingUpdateCount): * testing/Internals.h: * testing/Internals.idl: LayoutTests: * animations/steps-transform-rendering-updates-expected.txt: Added. * animations/steps-transform-rendering-updates.html: Added. Canonical link: https://commits.webkit.org/227580@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-24 21:03:23 +00:00
PASS successfullyParsed is true
TEST COMPLETE