Changeset 231840 in webkit
- Timestamp:
- May 16, 2018 1:27:54 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r231823 r231840 1 2018-05-16 Antoine Quint <graouts@apple.com> 2 3 REGRESSION (r230574): Interrupted hardware transitions don't behave correctly 4 https://bugs.webkit.org/show_bug.cgi?id=185299 5 <rdar://problem/39630230> 6 7 Reviewed by Simon Fraser. 8 9 Add a new test where we interrupt a transition and check that upon returning to the original value, 10 an animated value is still used and not the initial value. This test fails prior to this patch. 11 12 * transitions/interrupted-transition-hardware-expected.html: Added. 13 * transitions/interrupted-transition-hardware.html: Added. 14 1 15 2018-05-15 Commit Queue <commit-queue@webkit.org> 2 16 -
trunk/Source/WebCore/ChangeLog
r231839 r231840 1 2018-05-16 Antoine Quint <graouts@apple.com> 2 3 REGRESSION (r230574): Interrupted hardware transitions don't behave correctly 4 https://bugs.webkit.org/show_bug.cgi?id=185299 5 <rdar://problem/39630230> 6 7 Reviewed by Simon Fraser. 8 9 In r230574, the fix for webkit.org/b/184518, we changed the processing order in GraphicsLayerCA::updateAnimations() to first 10 process m_uncomittedAnimations and then m_animationsToProcess, so we are guaranteed animations exist before we attempt to pause 11 or seek them. This broke interrupting and resuming hardware animations (such as an interrupted CSS Transition or an animation 12 running in a non-visible tab) since a pause operation recorded _before_ an animation was added would be paused anyway since 13 the animation was now first added, and then paused. The fix is simply to clear any pending AnimationProcessingAction for a 14 newly-uncommitted animation. 15 16 Test: transitions/interrupted-transition-hardware.html 17 18 * platform/graphics/ca/GraphicsLayerCA.cpp: 19 (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): 20 (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): 21 (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): 22 * platform/graphics/ca/GraphicsLayerCA.h: 23 (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation): 24 1 25 2018-05-15 Yusuke Suzuki <utatane.tea@gmail.com> 2 26 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r231823 r231840 3016 3016 return false; 3017 3017 3018 m_uncomittedAnimations.append(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, 0, timeOffset));3018 appendToUncommittedAnimations(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, 0, timeOffset)); 3019 3019 3020 3020 return true; … … 3043 3043 return false; 3044 3044 3045 m_uncomittedAnimations.append(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, 0, timeOffset));3045 appendToUncommittedAnimations(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, 0, timeOffset)); 3046 3046 return true; 3047 3047 } … … 3105 3105 ASSERT(valuesOK); 3106 3106 3107 m_uncomittedAnimations.append(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, internalFilterPropertyIndex, timeOffset));3107 appendToUncommittedAnimations(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, internalFilterPropertyIndex, timeOffset)); 3108 3108 } 3109 3109 3110 3110 return true; 3111 } 3112 3113 void GraphicsLayerCA::appendToUncommittedAnimations(LayerPropertyAnimation&& animation) 3114 { 3115 // Since we're adding a new animation, make sure we clear any pending AnimationProcessingAction for this animation 3116 // as these are applied after we've committed new animations. 3117 m_animationsToProcess.remove(animation.m_name); 3118 3119 m_uncomittedAnimations.append(WTFMove(animation)); 3111 3120 } 3112 3121 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r231823 r231840 460 460 } 461 461 462 // This represents the animation of a single property. There may be multiple transform animations for 463 // a single transition or keyframe animation, so index is used to distinguish these. 464 struct LayerPropertyAnimation { 465 LayerPropertyAnimation(Ref<PlatformCAAnimation>&& caAnimation, const String& animationName, AnimatedPropertyID property, int index, int subIndex, Seconds timeOffset) 466 : m_animation(WTFMove(caAnimation)) 467 , m_name(animationName) 468 , m_property(property) 469 , m_index(index) 470 , m_subIndex(subIndex) 471 , m_timeOffset(timeOffset) 472 { } 473 474 RefPtr<PlatformCAAnimation> m_animation; 475 String m_name; 476 AnimatedPropertyID m_property; 477 int m_index; 478 int m_subIndex; 479 Seconds m_timeOffset; 480 }; 481 462 482 bool appendToUncommittedAnimations(const KeyframeValueList&, const TransformOperations*, const Animation*, const String& animationName, const FloatSize& boxSize, int animationIndex, Seconds timeOffset, bool isMatrixAnimation); 463 483 bool appendToUncommittedAnimations(const KeyframeValueList&, const FilterOperation*, const Animation*, const String& animationName, int animationIndex, Seconds timeOffset); 484 void appendToUncommittedAnimations(LayerPropertyAnimation&&); 464 485 465 486 enum LayerChange : uint64_t { … … 573 594 RetainPtr<CGImageRef> m_pendingContentsImage; 574 595 575 // This represents the animation of a single property. There may be multiple transform animations for576 // a single transition or keyframe animation, so index is used to distinguish these.577 struct LayerPropertyAnimation {578 LayerPropertyAnimation(Ref<PlatformCAAnimation>&& caAnimation, const String& animationName, AnimatedPropertyID property, int index, int subIndex, Seconds timeOffset)579 : m_animation(WTFMove(caAnimation))580 , m_name(animationName)581 , m_property(property)582 , m_index(index)583 , m_subIndex(subIndex)584 , m_timeOffset(timeOffset)585 { }586 587 RefPtr<PlatformCAAnimation> m_animation;588 String m_name;589 AnimatedPropertyID m_property;590 int m_index;591 int m_subIndex;592 Seconds m_timeOffset;593 };594 595 596 // Uncommitted transitions and animations. 596 597 Vector<LayerPropertyAnimation> m_uncomittedAnimations;
Note: See TracChangeset
for help on using the changeset viewer.