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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 static void setFillMode(Timing&, String fillMode); | 64 static void setFillMode(Timing&, String fillMode); |
65 static void setIterationStart(Timing&, double iterationStart); | 65 static void setIterationStart(Timing&, double iterationStart); |
66 static void setIterationCount(Timing&, double iterationCount); | 66 static void setIterationCount(Timing&, double iterationCount); |
67 static void setIterationDuration(Timing&, double iterationDuration); | 67 static void setIterationDuration(Timing&, double iterationDuration); |
68 static void setPlaybackRate(Timing&, double playbackRate); | 68 static void setPlaybackRate(Timing&, double playbackRate); |
69 static void setPlaybackDirection(Timing&, String direction); | 69 static void setPlaybackDirection(Timing&, String direction); |
70 static void setTimingFunction(Timing&, String timingFunctionString); | 70 static void setTimingFunction(Timing&, String timingFunctionString); |
71 | 71 |
72 virtual bool isAnimation() const OVERRIDE { return true; } | 72 virtual bool isAnimation() const OVERRIDE { return true; } |
73 | 73 |
74 const AnimationEffect::CompositableValueList* compositableValues() const | 74 const Vector<RefPtr<Interpolation> >& activeInterpolations() const |
75 { | 75 { |
76 ASSERT(m_compositableValues); | 76 ASSERT(m_activeInterpolations); |
77 return m_compositableValues.get(); | 77 return *m_activeInterpolations; |
78 } | 78 } |
79 | 79 |
80 bool affects(CSSPropertyID) const; | 80 bool affects(CSSPropertyID) const; |
81 const AnimationEffect* effect() const { return m_effect.get(); } | 81 const AnimationEffect* effect() const { return m_effect.get(); } |
82 Priority priority() const { return m_priority; } | 82 Priority priority() const { return m_priority; } |
83 Element* target() { return m_target.get(); } | 83 Element* target() { return m_target.get(); } |
84 | 84 |
85 bool isCandidateForAnimationOnCompositor() const; | 85 bool isCandidateForAnimationOnCompositor() const; |
86 // Must only be called once and assumes to be part of a player without a sta
rt time. | 86 // Must only be called once and assumes to be part of a player without a sta
rt time. |
87 bool maybeStartAnimationOnCompositor(); | 87 bool maybeStartAnimationOnCompositor(); |
(...skipping 12 matching lines...) Expand all Loading... |
100 | 100 |
101 private: | 101 private: |
102 static void populateTiming(Timing&, Dictionary); | 102 static void populateTiming(Timing&, Dictionary); |
103 | 103 |
104 Animation(PassRefPtr<Element>, PassRefPtrWillBeRawPtr<AnimationEffect>, cons
t Timing&, Priority, PassOwnPtr<EventDelegate>); | 104 Animation(PassRefPtr<Element>, PassRefPtrWillBeRawPtr<AnimationEffect>, cons
t Timing&, Priority, PassOwnPtr<EventDelegate>); |
105 | 105 |
106 RefPtr<Element> m_target; | 106 RefPtr<Element> m_target; |
107 RefPtrWillBePersistent<AnimationEffect> m_effect; | 107 RefPtrWillBePersistent<AnimationEffect> m_effect; |
108 | 108 |
109 bool m_activeInAnimationStack; | 109 bool m_activeInAnimationStack; |
110 OwnPtr<AnimationEffect::CompositableValueList> m_compositableValues; | 110 OwnPtr<Vector<RefPtr<Interpolation> > > m_activeInterpolations; |
111 | 111 |
112 Priority m_priority; | 112 Priority m_priority; |
113 | 113 |
114 Vector<int> m_compositorAnimationIds; | 114 Vector<int> m_compositorAnimationIds; |
115 | 115 |
116 friend class CSSAnimations; | 116 friend class CSSAnimations; |
117 friend class AnimationAnimationV8Test; | 117 friend class AnimationAnimationV8Test; |
118 }; | 118 }; |
119 | 119 |
120 DEFINE_TYPE_CASTS(Animation, TimedItem, timedItem, timedItem->isAnimation(), tim
edItem.isAnimation()); | 120 DEFINE_TYPE_CASTS(Animation, TimedItem, timedItem, timedItem->isAnimation(), tim
edItem.isAnimation()); |
121 | 121 |
122 } // namespace WebCore | 122 } // namespace WebCore |
123 | 123 |
124 #endif | 124 #endif |
OLD | NEW |