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

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

Issue 2236583003: Rename AnimationEffect to AnimationEffectReadOnly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@deprecated-assert
Patch Set: Rebase Created 4 years, 4 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 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
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 InertEffect_h 31 #ifndef InertEffect_h
32 #define InertEffect_h 32 #define InertEffect_h
33 33
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "core/animation/AnimationEffect.h" 35 #include "core/animation/AnimationEffectReadOnly.h"
36 #include "core/animation/EffectModel.h" 36 #include "core/animation/EffectModel.h"
37 #include "wtf/RefPtr.h" 37 #include "wtf/RefPtr.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 // Lightweight subset of KeyframeEffect. 41 // Lightweight subset of KeyframeEffect.
42 // Used to transport data for deferred KeyframeEffect construction and one off I nterpolation sampling. 42 // Used to transport data for deferred KeyframeEffect construction and one off I nterpolation sampling.
43 class CORE_EXPORT InertEffect final : public AnimationEffect { 43 class CORE_EXPORT InertEffect final : public AnimationEffectReadOnly {
44 public: 44 public:
45 static InertEffect* create(EffectModel*, const Timing&, bool paused, double inheritedTime); 45 static InertEffect* create(EffectModel*, const Timing&, bool paused, double inheritedTime);
46 void sample(Vector<RefPtr<Interpolation>>&) const; 46 void sample(Vector<RefPtr<Interpolation>>&) const;
47 EffectModel* model() const { return m_model.get(); } 47 EffectModel* model() const { return m_model.get(); }
48 bool paused() const { return m_paused; } 48 bool paused() const { return m_paused; }
49 49
50 bool isInertEffect() const final { return true; } 50 bool isInertEffect() const final { return true; }
51 51
52 DECLARE_VIRTUAL_TRACE(); 52 DECLARE_VIRTUAL_TRACE();
53 53
54 protected: 54 protected:
55 void updateChildrenAndEffects() const override { } 55 void updateChildrenAndEffects() const override { }
56 double calculateTimeToEffectChange(bool forwards, double inheritedTime, doub le timeToNextIteration) const override; 56 double calculateTimeToEffectChange(bool forwards, double inheritedTime, doub le timeToNextIteration) const override;
57 57
58 private: 58 private:
59 InertEffect(EffectModel*, const Timing&, bool paused, double inheritedTime); 59 InertEffect(EffectModel*, const Timing&, bool paused, double inheritedTime);
60 Member<EffectModel> m_model; 60 Member<EffectModel> m_model;
61 bool m_paused; 61 bool m_paused;
62 double m_inheritedTime; 62 double m_inheritedTime;
63 }; 63 };
64 64
65 DEFINE_TYPE_CASTS(InertEffect, AnimationEffect, animationEffect, animationEffect ->isInertEffect(), animationEffect.isInertEffect()); 65 DEFINE_TYPE_CASTS(InertEffect, AnimationEffectReadOnly, animationEffect, animati onEffect->isInertEffect(), animationEffect.isInertEffect());
66 66
67 } // namespace blink 67 } // namespace blink
68 68
69 #endif 69 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698