OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CSSAnimationUpdate_h | 5 #ifndef CSSAnimationUpdate_h |
6 #define CSSAnimationUpdate_h | 6 #define CSSAnimationUpdate_h |
7 | 7 |
8 #include "core/animation/EffectStack.h" | 8 #include "core/animation/EffectStack.h" |
9 #include "core/animation/InertEffect.h" | 9 #include "core/animation/InertEffect.h" |
10 #include "core/animation/Interpolation.h" | 10 #include "core/animation/Interpolation.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 m_cancelledTransitions.clear(); | 127 m_cancelledTransitions.clear(); |
128 m_finishedTransitions.clear(); | 128 m_finishedTransitions.clear(); |
129 m_updatedCompositorKeyframes.clear(); | 129 m_updatedCompositorKeyframes.clear(); |
130 } | 130 } |
131 | 131 |
132 void startAnimation(const AtomicString& animationName, | 132 void startAnimation(const AtomicString& animationName, |
133 size_t nameIndex, | 133 size_t nameIndex, |
134 const InertEffect& effect, | 134 const InertEffect& effect, |
135 const Timing& timing, | 135 const Timing& timing, |
136 StyleRuleKeyframes* styleRule) { | 136 StyleRuleKeyframes* styleRule) { |
137 m_newAnimations.append( | 137 m_newAnimations.push_back( |
138 NewCSSAnimation(animationName, nameIndex, effect, timing, styleRule)); | 138 NewCSSAnimation(animationName, nameIndex, effect, timing, styleRule)); |
139 } | 139 } |
140 // Returns whether animation has been suppressed and should be filtered during | 140 // Returns whether animation has been suppressed and should be filtered during |
141 // style application. | 141 // style application. |
142 bool isSuppressedAnimation(const Animation* animation) const { | 142 bool isSuppressedAnimation(const Animation* animation) const { |
143 return m_suppressedAnimations.contains(animation); | 143 return m_suppressedAnimations.contains(animation); |
144 } | 144 } |
145 void cancelAnimation(size_t index, const Animation& animation) { | 145 void cancelAnimation(size_t index, const Animation& animation) { |
146 m_cancelledAnimationIndices.append(index); | 146 m_cancelledAnimationIndices.push_back(index); |
147 m_suppressedAnimations.add(&animation); | 147 m_suppressedAnimations.add(&animation); |
148 } | 148 } |
149 void toggleAnimationIndexPaused(size_t index) { | 149 void toggleAnimationIndexPaused(size_t index) { |
150 m_animationIndicesWithPauseToggled.append(index); | 150 m_animationIndicesWithPauseToggled.push_back(index); |
151 } | 151 } |
152 void updateAnimation(size_t index, | 152 void updateAnimation(size_t index, |
153 Animation* animation, | 153 Animation* animation, |
154 const InertEffect& effect, | 154 const InertEffect& effect, |
155 const Timing& specifiedTiming, | 155 const Timing& specifiedTiming, |
156 StyleRuleKeyframes* styleRule) { | 156 StyleRuleKeyframes* styleRule) { |
157 m_animationsWithUpdates.append(UpdatedCSSAnimation( | 157 m_animationsWithUpdates.push_back(UpdatedCSSAnimation( |
158 index, animation, effect, specifiedTiming, styleRule)); | 158 index, animation, effect, specifiedTiming, styleRule)); |
159 m_suppressedAnimations.add(animation); | 159 m_suppressedAnimations.add(animation); |
160 } | 160 } |
161 void updateCompositorKeyframes(Animation* animation) { | 161 void updateCompositorKeyframes(Animation* animation) { |
162 m_updatedCompositorKeyframes.append(animation); | 162 m_updatedCompositorKeyframes.push_back(animation); |
163 } | 163 } |
164 | 164 |
165 void startTransition(CSSPropertyID id, | 165 void startTransition(CSSPropertyID id, |
166 const AnimatableValue* from, | 166 const AnimatableValue* from, |
167 const AnimatableValue* to, | 167 const AnimatableValue* to, |
168 PassRefPtr<AnimatableValue> reversingAdjustedStartValue, | 168 PassRefPtr<AnimatableValue> reversingAdjustedStartValue, |
169 double reversingShorteningFactor, | 169 double reversingShorteningFactor, |
170 const InertEffect& effect) { | 170 const InertEffect& effect) { |
171 NewTransition newTransition; | 171 NewTransition newTransition; |
172 newTransition.id = id; | 172 newTransition.id = id; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 279 |
280 ActiveInterpolationsMap m_activeInterpolationsForAnimations; | 280 ActiveInterpolationsMap m_activeInterpolationsForAnimations; |
281 ActiveInterpolationsMap m_activeInterpolationsForTransitions; | 281 ActiveInterpolationsMap m_activeInterpolationsForTransitions; |
282 | 282 |
283 friend class PendingAnimationUpdate; | 283 friend class PendingAnimationUpdate; |
284 }; | 284 }; |
285 | 285 |
286 } // namespace blink | 286 } // namespace blink |
287 | 287 |
288 #endif | 288 #endif |
OLD | NEW |