Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1090)

Side by Side Diff: third_party/WebKit/Source/core/animation/CompositorAnimationsImpl.h

Issue 1616653002: CC Animation: Move files from cc_blink to Source/platform/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Fix copyrights and years. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef CompositorAnimationsImpl_h 31 #ifndef CompositorAnimationsImpl_h
32 #define CompositorAnimationsImpl_h 32 #define CompositorAnimationsImpl_h
33 33
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "core/animation/EffectModel.h" 35 #include "core/animation/EffectModel.h"
36 #include "core/animation/KeyframeEffectModel.h" 36 #include "core/animation/KeyframeEffectModel.h"
37 #include "core/animation/Timing.h" 37 #include "core/animation/Timing.h"
38 #include "platform/animation/CompositorAnimation.h"
38 #include "platform/animation/TimingFunction.h" 39 #include "platform/animation/TimingFunction.h"
39 #include "public/platform/WebCompositorAnimation.h"
40 #include "wtf/Allocator.h" 40 #include "wtf/Allocator.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class WebCompositorAnimationCurve; 44 class CompositorAnimationCurve;
45 45
46 class CORE_EXPORT CompositorAnimationsImpl { 46 class CORE_EXPORT CompositorAnimationsImpl {
47 STATIC_ONLY(CompositorAnimationsImpl); 47 STATIC_ONLY(CompositorAnimationsImpl);
48 private: 48 private:
49 struct CompositorTiming { 49 struct CompositorTiming {
50 DISALLOW_NEW(); 50 DISALLOW_NEW();
51 void assertValid() const 51 void assertValid() const
52 { 52 {
53 ASSERT(scaledDuration > 0); 53 ASSERT(scaledDuration > 0);
54 ASSERT(std::isfinite(scaledTimeOffset)); 54 ASSERT(std::isfinite(scaledTimeOffset));
55 ASSERT(adjustedIterationCount > 0 || adjustedIterationCount == -1); 55 ASSERT(adjustedIterationCount > 0 || adjustedIterationCount == -1);
56 ASSERT(std::isfinite(playbackRate) && playbackRate); 56 ASSERT(std::isfinite(playbackRate) && playbackRate);
57 ASSERT(iterationStart >= 0); 57 ASSERT(iterationStart >= 0);
58 } 58 }
59 59
60 Timing::PlaybackDirection direction; 60 Timing::PlaybackDirection direction;
61 double scaledDuration; 61 double scaledDuration;
62 double scaledTimeOffset; 62 double scaledTimeOffset;
63 double adjustedIterationCount; 63 double adjustedIterationCount;
64 double playbackRate; 64 double playbackRate;
65 Timing::FillMode fillMode; 65 Timing::FillMode fillMode;
66 double iterationStart; 66 double iterationStart;
67 }; 67 };
68 68
69 static bool convertTimingForCompositor(const Timing&, double timeOffset, Com positorTiming& out, double animationPlaybackRate); 69 static bool convertTimingForCompositor(const Timing&, double timeOffset, Com positorTiming& out, double animationPlaybackRate);
70 70
71 static void getAnimationOnCompositor(const Timing&, int group, double startT ime, double timeOffset, const KeyframeEffectModelBase&, Vector<OwnPtr<WebComposi torAnimation>>& animations, double animationPlaybackRate); 71 static void getAnimationOnCompositor(const Timing&, int group, double startT ime, double timeOffset, const KeyframeEffectModelBase&, Vector<OwnPtr<Compositor Animation>>& animations, double animationPlaybackRate);
72 72
73 static void addKeyframesToCurve(WebCompositorAnimationCurve&, const Animatab leValuePropertySpecificKeyframeVector&, const Timing&); 73 static void addKeyframesToCurve(CompositorAnimationCurve&, const AnimatableV aluePropertySpecificKeyframeVector&, const Timing&);
74 74
75 friend class CompositorAnimations; 75 friend class CompositorAnimations;
76 friend class AnimationCompositorAnimationsTest; 76 friend class AnimationCompositorAnimationsTest;
77 }; 77 };
78 78
79 } // namespace blink 79 } // namespace blink
80 80
81 #endif 81 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698