| 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/AnimationStack.h" | 8 #include "core/animation/AnimationStack.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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 StyleRuleKeyframes* styleRule) | 145 StyleRuleKeyframes* styleRule) |
| 146 { | 146 { |
| 147 m_animationsWithUpdates.append(UpdatedCSSAnimation(index, animation, eff
ect, specifiedTiming, styleRule)); | 147 m_animationsWithUpdates.append(UpdatedCSSAnimation(index, animation, eff
ect, specifiedTiming, styleRule)); |
| 148 m_suppressedAnimations.add(animation); | 148 m_suppressedAnimations.add(animation); |
| 149 } | 149 } |
| 150 void updateCompositorKeyframes(Animation* animation) | 150 void updateCompositorKeyframes(Animation* animation) |
| 151 { | 151 { |
| 152 m_updatedCompositorKeyframes.append(animation); | 152 m_updatedCompositorKeyframes.append(animation); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void startTransition(CSSPropertyID id, const AnimatableValue* from, const An
imatableValue* to, PassRefPtr<AnimatableValue> reversingAdjustedStartValue, doub
le reversingShorteningFactor, const InertEffect& effect) | 155 void startTransition(CSSPropertyID id, PassRefPtr<AnimatableValue> from, Pas
sRefPtr<AnimatableValue> to, PassRefPtr<AnimatableValue> reversingAdjustedStartV
alue, double reversingShorteningFactor, const InertEffect& effect) |
| 156 { | 156 { |
| 157 NewTransition newTransition; | 157 NewTransition newTransition; |
| 158 newTransition.id = id; | 158 newTransition.id = id; |
| 159 newTransition.from = from; | 159 newTransition.from = from; |
| 160 newTransition.to = to; | 160 newTransition.to = to; |
| 161 newTransition.reversingAdjustedStartValue = reversingAdjustedStartValue; | 161 newTransition.reversingAdjustedStartValue = reversingAdjustedStartValue; |
| 162 newTransition.reversingShorteningFactor = reversingShorteningFactor; | 162 newTransition.reversingShorteningFactor = reversingShorteningFactor; |
| 163 newTransition.effect = &effect; | 163 newTransition.effect = &effect; |
| 164 m_newTransitions.set(id, newTransition); | 164 m_newTransitions.set(id, newTransition); |
| 165 } | 165 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 176 | 176 |
| 177 struct NewTransition { | 177 struct NewTransition { |
| 178 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 178 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 179 public: | 179 public: |
| 180 DEFINE_INLINE_TRACE() | 180 DEFINE_INLINE_TRACE() |
| 181 { | 181 { |
| 182 visitor->trace(effect); | 182 visitor->trace(effect); |
| 183 } | 183 } |
| 184 | 184 |
| 185 CSSPropertyID id; | 185 CSSPropertyID id; |
| 186 const AnimatableValue* from; | 186 RefPtr<AnimatableValue> from; |
| 187 const AnimatableValue* to; | 187 RefPtr<AnimatableValue> to; |
| 188 RefPtr<AnimatableValue> reversingAdjustedStartValue; | 188 RefPtr<AnimatableValue> reversingAdjustedStartValue; |
| 189 double reversingShorteningFactor; | 189 double reversingShorteningFactor; |
| 190 Member<const InertEffect> effect; | 190 Member<const InertEffect> effect; |
| 191 }; | 191 }; |
| 192 using NewTransitionMap = HeapHashMap<CSSPropertyID, NewTransition>; | 192 using NewTransitionMap = HeapHashMap<CSSPropertyID, NewTransition>; |
| 193 const NewTransitionMap& newTransitions() const { return m_newTransitions; } | 193 const NewTransitionMap& newTransitions() const { return m_newTransitions; } |
| 194 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel
ledTransitions; } | 194 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel
ledTransitions; } |
| 195 const HashSet<CSSPropertyID>& finishedTransitions() const { return m_finishe
dTransitions; } | 195 const HashSet<CSSPropertyID>& finishedTransitions() const { return m_finishe
dTransitions; } |
| 196 | 196 |
| 197 void adoptActiveInterpolationsForAnimations(ActiveInterpolationsMap& newMap)
{ newMap.swap(m_activeInterpolationsForAnimations); } | 197 void adoptActiveInterpolationsForAnimations(ActiveInterpolationsMap& newMap)
{ newMap.swap(m_activeInterpolationsForAnimations); } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 ActiveInterpolationsMap m_activeInterpolationsForAnimations; | 243 ActiveInterpolationsMap m_activeInterpolationsForAnimations; |
| 244 ActiveInterpolationsMap m_activeInterpolationsForTransitions; | 244 ActiveInterpolationsMap m_activeInterpolationsForTransitions; |
| 245 | 245 |
| 246 friend class PendingAnimationUpdate; | 246 friend class PendingAnimationUpdate; |
| 247 }; | 247 }; |
| 248 | 248 |
| 249 } // namespace blink | 249 } // namespace blink |
| 250 | 250 |
| 251 #endif | 251 #endif |
| OLD | NEW |