Changeset 255663 in webkit
- Timestamp:
- Feb 3, 2020 9:56:04 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r255621 r255663 1 2020-02-03 Antti Koivisto <antti@apple.com> 2 3 Accelerated animations freeze on render tree rebuild 4 https://bugs.webkit.org/show_bug.cgi?id=201048 5 <rdar://problem/54612621> 6 7 Reviewed by Antoine Quint. 8 9 * webanimations/accelerated-animation-renderer-change-expected.html: Added. 10 * webanimations/accelerated-animation-renderer-change.html: Added. 11 1 12 2020-02-03 Jacob Uphoff <jacob_uphoff@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r255661 r255663 1 2020-02-03 Antti Koivisto <antti@apple.com> 2 3 Accelerated animations freeze on render tree rebuild 4 https://bugs.webkit.org/show_bug.cgi?id=201048 5 <rdar://problem/54612621> 6 7 Reviewed by Antoine Quint. 8 9 If there is an accelerated animation in progress for a renderer and the render tree is rebuild the animation 10 does not continue with the new renderer. 11 12 To fix, make sure that the animation leaves the accelerated state when the renderer is removed. The new renderer 13 will then become accelerated automatically. 14 15 Original test case by Tim Guan-tin Chien. 16 17 Test: webanimations/accelerated-animation-renderer-change.html 18 19 * animation/AnimationTimeline.cpp: 20 (WebCore::AnimationTimeline::willChangeRendererForElement): 21 * animation/AnimationTimeline.h: 22 * animation/KeyframeEffect.cpp: 23 (WebCore::KeyframeEffect::willChangeRenderer): 24 * animation/KeyframeEffect.h: 25 * animation/WebAnimation.cpp: 26 (WebCore::WebAnimation::willChangeRenderer): 27 * animation/WebAnimation.h: 28 * rendering/updating/RenderTreeUpdater.cpp: 29 (WebCore::RenderTreeUpdater::tearDownRenderers): 30 1 31 2020-02-03 Andres Gonzalez <andresg_22@apple.com> 2 32 -
trunk/Source/WebCore/animation/AnimationTimeline.cpp
r255552 r255663 242 242 } 243 243 244 void AnimationTimeline::willChangeRendererForElement(Element& element) 245 { 246 for (auto& animation : animationsForElement(element)) 247 animation->willChangeRenderer(); 248 } 249 244 250 void AnimationTimeline::cancelDeclarativeAnimationsForElement(Element& element) 245 251 { -
trunk/Source/WebCore/animation/AnimationTimeline.h
r255076 r255663 62 62 void elementWasRemoved(Element&); 63 63 void removeAnimationsForElement(Element&); 64 void willChangeRendererForElement(Element&); 64 65 void cancelDeclarativeAnimationsForElement(Element&); 65 66 virtual void animationWasAddedToElement(WebAnimation&, Element&); -
trunk/Source/WebCore/animation/KeyframeEffect.cpp
r255593 r255663 1396 1396 } 1397 1397 1398 void KeyframeEffect::willChangeRenderer() 1399 { 1400 if (m_isRunningAccelerated) 1401 addPendingAcceleratedAction(AcceleratedAction::Stop); 1402 } 1403 1398 1404 void KeyframeEffect::animationSuspensionStateDidChange(bool animationIsSuspended) 1399 1405 { -
trunk/Source/WebCore/animation/KeyframeEffect.h
r255593 r255663 123 123 void applyPendingAcceleratedActions(); 124 124 125 void willChangeRenderer(); 126 125 127 void setAnimation(WebAnimation*) final; 126 128 -
trunk/Source/WebCore/animation/WebAnimation.cpp
r255504 r255663 674 674 if (m_effect) 675 675 m_effect->animationWasCanceled(); 676 } 677 678 void WebAnimation::willChangeRenderer() 679 { 680 if (is<KeyframeEffect>(m_effect)) 681 downcast<KeyframeEffect>(*m_effect).willChangeRenderer(); 676 682 } 677 683 -
trunk/Source/WebCore/animation/WebAnimation.h
r255422 r255663 124 124 void acceleratedStateDidChange(); 125 125 void applyPendingAcceleratedActions(); 126 void willChangeRenderer(); 126 127 127 128 bool isRunningAccelerated() const; -
trunk/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
r254797 r255663 562 562 auto& element = *teardownStack.takeLast(); 563 563 564 if (teardownType == TeardownType::Full || teardownType == TeardownType::RendererUpdateCancelingAnimations) { 564 switch (teardownType) { 565 case TeardownType::Full: 566 case TeardownType::RendererUpdateCancelingAnimations: 565 567 if (timeline) { 566 568 if (document.renderTreeBeingDestroyed()) … … 570 572 } 571 573 animationController.cancelAnimations(element); 574 break; 575 case TeardownType::RendererUpdate: 576 if (timeline) 577 timeline->willChangeRendererForElement(element); 578 break; 572 579 } 573 580
Note: See TracChangeset
for help on using the changeset viewer.