Changeset 268754 in webkit
- Timestamp:
- Oct 20, 2020, 1:10:17 PM (6 years ago)
- Location:
- branches/safari-611.1.4-branch
- Files:
-
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/mac/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/win/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (modified) (4 diffs)
-
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-611.1.4-branch/LayoutTests/ChangeLog
r268640 r268754 1 2020-10-20 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r268746. rdar://problem/70497736 4 5 REGRESSION(r268615): some accelerated transform tests are failing 6 https://bugs.webkit.org/show_bug.cgi?id=217851 7 <rdar://problem/70394402> 8 9 Reviewed by Dean Jackson. 10 11 Source/WebCore: 12 13 When we added support for accelerated individual transform properties animations, we added 14 the notion of base transform animations which are used to set the base value of any 15 transform-related property that is not animated. 16 17 Those animations were defined to start as early as possible, assuming that a very small value 18 after 0s was as early as possible. However, it's possible that other animations start with a 19 negative time if they have a delay or are seeked, if the value returned by CACurrentMediaTime() 20 is smaller than that delay. This means that if the machine had been booted for less time than 21 an accelerated animation's delay, the base transform animation wouldn't overlap. 22 23 We now ensure that those base transform animations start as early as the earliest animation 24 that is being committed in a call to GraphicsLayerCA::updateAnimations(). 25 26 * platform/graphics/ca/GraphicsLayerCA.cpp: 27 (WebCore::GraphicsLayerCA::updateAnimations): 28 (WebCore::GraphicsLayerCA::setAnimationOnLayer): 29 * platform/graphics/ca/GraphicsLayerCA.h: 30 (WebCore::GraphicsLayerCA::LayerPropertyAnimation::computedBeginTime const): 31 32 LayoutTests: 33 34 Remove flaky epectations for affected tests and skip tests on Windows where failures remain. 35 36 * TestExpectations: 37 * platform/mac/TestExpectations: 38 * platform/win/TestExpectations: 39 40 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268746 268f45cc-cd09-0410-ab3c-d52691b4dbfc 41 42 2020-10-20 Antoine Quint <graouts@webkit.org> 43 44 REGRESSION(r268615): some accelerated transform tests are failing 45 https://bugs.webkit.org/show_bug.cgi?id=217851 46 <rdar://problem/70394402> 47 48 Reviewed by Dean Jackson. 49 50 Remove flaky epectations for affected tests and skip tests on Windows where failures remain. 51 52 * TestExpectations: 53 * platform/mac/TestExpectations: 54 * platform/win/TestExpectations: 55 1 56 2020-10-17 Ross Kirsling <ross.kirsling@sony.com> 2 57 -
branches/safari-611.1.4-branch/LayoutTests/TestExpectations
r268615 r268754 4519 4519 fast/layoutformattingcontext/ [ ImageOnlyFailure ] 4520 4520 webkit.org/b/217054 fast/layoutformattingcontext/horizontal-sizing-with-trailing-letter-spacing.html [ Skip ] 4521 4522 webkit.org/b/217851 transitions/interrupted-transition-hardware.html [ Pass Failure ]4523 webkit.org/b/217851 webanimations/accelerated-transform-related-animation-property-order.html [ Pass Failure ]4524 webkit.org/b/217851 webanimations/accelerated-translate-animation-additional-animation-added-in-flight.html [ Pass Failure ]4525 webkit.org/b/217851 webanimations/accelerated-translate-animation-underlying-transform-changed-in-flight.html [ Pass Failure ]4526 webkit.org/b/217851 webanimations/accelerated-translate-animation-with-transform.html [ Pass Failure ]4527 webkit.org/b/217851 webanimations/accelerated-translate-animation.html [ Pass Failure ] -
branches/safari-611.1.4-branch/LayoutTests/platform/mac/TestExpectations
r268627 r268754 2247 2247 webkit.org/b/217620 inspector/audit/basic-async.htm [ Pass Timeout ] 2248 2248 2249 2250 # These are failing on Mojave due to an error in the way CA animations are applied.2251 # https://bugs.webkit.org/show_bug.cgi?id=2178422252 [ Mojave ] transitions/interrupted-transition-hardware.html [ Pass Failure ]2253 [ Mojave ] webanimations/accelerated-transform-related-animation-property-order.html [ Pass Failure ]2254 [ Mojave ] webanimations/accelerated-translate-animation-additional-animation-added-in-flight.html [ Pass Failure ]2255 [ Mojave ] webanimations/accelerated-translate-animation-underlying-transform-changed-in-flight.html [ Pass Failure ]2256 [ Mojave ] webanimations/accelerated-translate-animation-with-transform.html [ Pass Failure ]2257 [ Mojave ] webanimations/accelerated-translate-animation.html [ Pass Failure ] -
branches/safari-611.1.4-branch/LayoutTests/platform/win/TestExpectations
r268614 r268754 4587 4587 webkit.org/b/217812 transforms/2d/translate-change-composited.html [ Skip ] 4588 4588 webkit.org/b/217812 transforms/2d/rotate-composited.html [ Skip ] 4589 webkit.org/b/217812 webanimations/accelerated-transform-related-animation-property-order.html [ Skip ] 4590 webkit.org/b/217812 webanimations/accelerated-translate-animation-additional-animation-added-in-flight.html [ Skip ] 4591 webkit.org/b/217812 webanimations/accelerated-translate-animation-underlying-transform-changed-in-flight.html [ Skip ] 4592 webkit.org/b/217812 webanimations/accelerated-translate-animation-with-transform.html [ Skip ] 4593 webkit.org/b/217812 webanimations/accelerated-translate-animation.html [ Skip ] -
branches/safari-611.1.4-branch/Source/WebCore/ChangeLog
r268753 r268754 1 2020-10-20 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r268746. rdar://problem/70497736 4 5 REGRESSION(r268615): some accelerated transform tests are failing 6 https://bugs.webkit.org/show_bug.cgi?id=217851 7 <rdar://problem/70394402> 8 9 Reviewed by Dean Jackson. 10 11 Source/WebCore: 12 13 When we added support for accelerated individual transform properties animations, we added 14 the notion of base transform animations which are used to set the base value of any 15 transform-related property that is not animated. 16 17 Those animations were defined to start as early as possible, assuming that a very small value 18 after 0s was as early as possible. However, it's possible that other animations start with a 19 negative time if they have a delay or are seeked, if the value returned by CACurrentMediaTime() 20 is smaller than that delay. This means that if the machine had been booted for less time than 21 an accelerated animation's delay, the base transform animation wouldn't overlap. 22 23 We now ensure that those base transform animations start as early as the earliest animation 24 that is being committed in a call to GraphicsLayerCA::updateAnimations(). 25 26 * platform/graphics/ca/GraphicsLayerCA.cpp: 27 (WebCore::GraphicsLayerCA::updateAnimations): 28 (WebCore::GraphicsLayerCA::setAnimationOnLayer): 29 * platform/graphics/ca/GraphicsLayerCA.h: 30 (WebCore::GraphicsLayerCA::LayerPropertyAnimation::computedBeginTime const): 31 32 LayoutTests: 33 34 Remove flaky epectations for affected tests and skip tests on Windows where failures remain. 35 36 * TestExpectations: 37 * platform/mac/TestExpectations: 38 * platform/win/TestExpectations: 39 40 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268746 268f45cc-cd09-0410-ab3c-d52691b4dbfc 41 42 2020-10-20 Antoine Quint <graouts@webkit.org> 43 44 REGRESSION(r268615): some accelerated transform tests are failing 45 https://bugs.webkit.org/show_bug.cgi?id=217851 46 <rdar://problem/70394402> 47 48 Reviewed by Dean Jackson. 49 50 When we added support for accelerated individual transform properties animations, we added 51 the notion of base transform animations which are used to set the base value of any 52 transform-related property that is not animated. 53 54 Those animations were defined to start as early as possible, assuming that a very small value 55 after 0s was as early as possible. However, it's possible that other animations start with a 56 negative time if they have a delay or are seeked, if the value returned by CACurrentMediaTime() 57 is smaller than that delay. This means that if the machine had been booted for less time than 58 an accelerated animation's delay, the base transform animation wouldn't overlap. 59 60 We now ensure that those base transform animations start as early as the earliest animation 61 that is being committed in a call to GraphicsLayerCA::updateAnimations(). 62 63 * platform/graphics/ca/GraphicsLayerCA.cpp: 64 (WebCore::GraphicsLayerCA::updateAnimations): 65 (WebCore::GraphicsLayerCA::setAnimationOnLayer): 66 * platform/graphics/ca/GraphicsLayerCA.h: 67 (WebCore::GraphicsLayerCA::LayerPropertyAnimation::computedBeginTime const): 68 1 69 2020-10-20 Alan Coon <alancoon@apple.com> 2 70 -
branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r268615 r268754 2862 2862 void GraphicsLayerCA::updateAnimations() 2863 2863 { 2864 auto baseTransformAnimationBeginTime = 1_s; 2865 auto currentTime = Seconds(CACurrentMediaTime()); 2866 auto updateBeginTimes = [&](LayerPropertyAnimation& animation) 2867 { 2868 if (animation.m_pendingRemoval) 2869 return; 2870 2871 // In case we have an offset, and we haven't set an explicit begin time previously, 2872 // we need to record the beginTime now. 2873 if (animation.m_timeOffset && !animation.m_beginTime) 2874 animation.m_beginTime = currentTime; 2875 2876 // Now check if we have a resolved begin time and ensure the begin time we'll use for 2877 // base transform animations matches the smallest known begin time to guarantee that 2878 // such animations can combine with other explicit transform animations correctly. 2879 if (auto computedBeginTime = animation.computedBeginTime()) 2880 baseTransformAnimationBeginTime = std::min(baseTransformAnimationBeginTime, *computedBeginTime); 2881 }; 2882 2864 2883 enum class Additive { Yes, No }; 2865 2884 auto addAnimation = [&](LayerPropertyAnimation& animation, Additive additive = Additive::Yes) { … … 2891 2910 // To ensure the base value transform is applied along with all the interpolating animations, we set it to have started 2892 2911 // as early as possible, which combined with the infinite duration ensures it's current for any given CA media time. 2893 animation.m_beginTime = Seconds::fromNanoseconds(1);2912 animation.m_beginTime = baseTransformAnimationBeginTime; 2894 2913 2895 2914 // Additivity will depend on the source of the matrix, if it was explicitly provided as an identity matrix, it … … 2901 2920 }; 2902 2921 2903 // Remove all running CA animations. 2922 // Iterate through all animations to update each animation's begin time, if necessary, 2923 // compute the base transform animation begin times and remove all running CA animations. 2904 2924 for (auto& animation : m_animations) { 2925 updateBeginTimes(animation); 2905 2926 if (animation.m_playState == PlayState::Playing || animation.m_playState == PlayState::Paused) 2906 2927 removeCAAnimationFromLayer(animation); … … 3022 3043 auto& caAnim = *animation.m_animation; 3023 3044 3024 if (animation.m_timeOffset) { 3025 // In case we have an offset, we need to record the beginTime now since we have to pass in an explicit 3026 // value in the first place. 3027 if (!animation.m_beginTime) 3028 animation.m_beginTime = Seconds(CACurrentMediaTime()); 3029 caAnim.setBeginTime((animation.m_beginTime - animation.m_timeOffset).seconds()); 3030 } else if (animation.m_beginTime) { 3031 // If we already have a begin time, then we already started in the past and must ensure we use that same 3032 // begin time. Any other case will get use the CA transaction's time as its begin time and will be recorded 3033 // in platformCALayerAnimationStarted(). 3034 caAnim.setBeginTime(animation.m_beginTime.seconds()); 3035 } 3045 if (auto beginTime = animation.computedBeginTime()) 3046 caAnim.setBeginTime(beginTime->seconds()); 3036 3047 3037 3048 String animationID = animation.animationIdentifier(); -
branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r268615 r268754 31 31 #include "PlatformCALayerClient.h" 32 32 #include <wtf/HashMap.h> 33 #include <wtf/Optional.h> 33 34 #include <wtf/RetainPtr.h> 34 35 #include <wtf/text/StringHash.h> … … 463 464 464 465 String animationIdentifier() const { return makeString(m_name, '_', static_cast<unsigned>(m_property), '_', m_index, '_', m_subIndex); } 466 Optional<Seconds> computedBeginTime() const 467 { 468 if (m_beginTime) 469 return m_beginTime - m_timeOffset; 470 return WTF::nullopt; 471 } 465 472 466 473 RefPtr<PlatformCAAnimation> m_animation;
Note:
See TracChangeset
for help on using the changeset viewer.