OLD | NEW |
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 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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 SKY_ENGINE_CORE_ANIMATION_ANIMATIONNODE_H_ | 31 #ifndef SKY_ENGINE_CORE_ANIMATION_ANIMATIONNODE_H_ |
32 #define SKY_ENGINE_CORE_ANIMATION_ANIMATIONNODE_H_ | 32 #define SKY_ENGINE_CORE_ANIMATION_ANIMATIONNODE_H_ |
33 | 33 |
34 #include "sky/engine/bindings/core/v8/ScriptWrappable.h" | 34 #include "sky/engine/tonic/dart_wrappable.h" |
35 #include "sky/engine/core/animation/Timing.h" | 35 #include "sky/engine/core/animation/Timing.h" |
36 #include "sky/engine/wtf/OwnPtr.h" | 36 #include "sky/engine/wtf/OwnPtr.h" |
37 #include "sky/engine/wtf/PassOwnPtr.h" | 37 #include "sky/engine/wtf/PassOwnPtr.h" |
38 #include "sky/engine/wtf/RefCounted.h" | 38 #include "sky/engine/wtf/RefCounted.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class AnimationPlayer; | 42 class AnimationPlayer; |
43 class AnimationNode; | 43 class AnimationNode; |
44 class AnimationNodeTiming; | 44 class AnimationNodeTiming; |
45 | 45 |
46 enum TimingUpdateReason { | 46 enum TimingUpdateReason { |
47 TimingUpdateOnDemand, | 47 TimingUpdateOnDemand, |
48 TimingUpdateForAnimationFrame | 48 TimingUpdateForAnimationFrame |
49 }; | 49 }; |
50 | 50 |
51 static inline bool isNull(double value) | 51 static inline bool isNull(double value) |
52 { | 52 { |
53 return std::isnan(value); | 53 return std::isnan(value); |
54 } | 54 } |
55 | 55 |
56 static inline double nullValue() | 56 static inline double nullValue() |
57 { | 57 { |
58 return std::numeric_limits<double>::quiet_NaN(); | 58 return std::numeric_limits<double>::quiet_NaN(); |
59 } | 59 } |
60 | 60 |
61 class AnimationNode : public RefCounted<AnimationNode>, public ScriptWrappable { | 61 class AnimationNode : public RefCounted<AnimationNode>, public DartWrappable { |
62 DEFINE_WRAPPERTYPEINFO(); | 62 DEFINE_WRAPPERTYPEINFO(); |
63 friend class AnimationPlayer; // Calls attach/detach, updateInheritedTime. | 63 friend class AnimationPlayer; // Calls attach/detach, updateInheritedTime. |
64 public: | 64 public: |
65 // Note that logic in CSSAnimations depends on the order of these values. | 65 // Note that logic in CSSAnimations depends on the order of these values. |
66 enum Phase { | 66 enum Phase { |
67 PhaseBefore, | 67 PhaseBefore, |
68 PhaseActive, | 68 PhaseActive, |
69 PhaseAfter, | 69 PhaseAfter, |
70 PhaseNone, | 70 PhaseNone, |
71 }; | 71 }; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } m_calculated; | 160 } m_calculated; |
161 mutable bool m_needsUpdate; | 161 mutable bool m_needsUpdate; |
162 mutable double m_lastUpdateTime; | 162 mutable double m_lastUpdateTime; |
163 | 163 |
164 const CalculatedTiming& ensureCalculated() const; | 164 const CalculatedTiming& ensureCalculated() const; |
165 }; | 165 }; |
166 | 166 |
167 } // namespace blink | 167 } // namespace blink |
168 | 168 |
169 #endif // SKY_ENGINE_CORE_ANIMATION_ANIMATIONNODE_H_ | 169 #endif // SKY_ENGINE_CORE_ANIMATION_ANIMATIONNODE_H_ |
OLD | NEW |