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/Interpolation.h" | 8 #include "core/animation/Interpolation.h" |
| 9 #include "core/animation/InterpolationPipeline.h" |
9 #include "core/css/CSSKeyframesRule.h" | 10 #include "core/css/CSSKeyframesRule.h" |
10 #include "wtf/HashMap.h" | 11 #include "wtf/HashMap.h" |
11 #include "wtf/Vector.h" | 12 #include "wtf/Vector.h" |
12 #include "wtf/text/AtomicString.h" | 13 #include "wtf/text/AtomicString.h" |
13 | 14 |
14 namespace blink { | 15 namespace blink { |
15 | 16 |
16 class AnimationPlayer; | 17 class AnimationPlayer; |
17 class InertAnimation; | 18 class InertAnimation; |
18 | 19 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 CSSPropertyID id; | 140 CSSPropertyID id; |
140 CSSPropertyID eventId; | 141 CSSPropertyID eventId; |
141 RawPtrWillBeMember<const AnimatableValue> from; | 142 RawPtrWillBeMember<const AnimatableValue> from; |
142 RawPtrWillBeMember<const AnimatableValue> to; | 143 RawPtrWillBeMember<const AnimatableValue> to; |
143 RefPtrWillBeMember<InertAnimation> animation; | 144 RefPtrWillBeMember<InertAnimation> animation; |
144 }; | 145 }; |
145 using NewTransitionMap = WillBeHeapHashMap<CSSPropertyID, NewTransition>; | 146 using NewTransitionMap = WillBeHeapHashMap<CSSPropertyID, NewTransition>; |
146 const NewTransitionMap& newTransitions() const { return m_newTransitions; } | 147 const NewTransitionMap& newTransitions() const { return m_newTransitions; } |
147 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel
ledTransitions; } | 148 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel
ledTransitions; } |
148 | 149 |
149 void adoptActiveInterpolationsForAnimations(WillBeHeapHashMap<CSSPropertyID,
RefPtrWillBeMember<Interpolation>>& newMap) { newMap.swap(m_activeInterpolation
sForAnimations); } | 150 void adoptActiveInterpolationsForAnimations(InterpolationPipelineMap& newMap
) { newMap.swap(m_activeInterpolationsForAnimations); } |
150 void adoptActiveInterpolationsForTransitions(WillBeHeapHashMap<CSSPropertyID
, RefPtrWillBeMember<Interpolation>>& newMap) { newMap.swap(m_activeInterpolatio
nsForTransitions); } | 151 void adoptActiveInterpolationsForTransitions(InterpolationPipelineMap& newMa
p) { newMap.swap(m_activeInterpolationsForTransitions); } |
151 const WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>>& a
ctiveInterpolationsForAnimations() const { return m_activeInterpolationsForAnima
tions; } | 152 const InterpolationPipelineMap& activeInterpolationsForAnimations() const {
return m_activeInterpolationsForAnimations; } |
152 const WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>>& a
ctiveInterpolationsForTransitions() const { return m_activeInterpolationsForTran
sitions; } | 153 const InterpolationPipelineMap& activeInterpolationsForTransitions() const {
return m_activeInterpolationsForTransitions; } |
153 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>>& activeI
nterpolationsForAnimations() { return m_activeInterpolationsForAnimations; } | 154 InterpolationPipelineMap& activeInterpolationsForAnimations() { return m_act
iveInterpolationsForAnimations; } |
154 | 155 |
155 bool isEmpty() const | 156 bool isEmpty() const |
156 { | 157 { |
157 return m_newAnimations.isEmpty() | 158 return m_newAnimations.isEmpty() |
158 && m_cancelledAnimationNames.isEmpty() | 159 && m_cancelledAnimationNames.isEmpty() |
159 && m_suppressedAnimationPlayers.isEmpty() | 160 && m_suppressedAnimationPlayers.isEmpty() |
160 && m_animationsWithPauseToggled.isEmpty() | 161 && m_animationsWithPauseToggled.isEmpty() |
161 && m_animationsWithUpdates.isEmpty() | 162 && m_animationsWithUpdates.isEmpty() |
162 && m_newTransitions.isEmpty() | 163 && m_newTransitions.isEmpty() |
163 && m_cancelledTransitions.isEmpty() | 164 && m_cancelledTransitions.isEmpty() |
(...skipping 10 matching lines...) Expand all Loading... |
174 // incomplete keyframes. | 175 // incomplete keyframes. |
175 WillBeHeapVector<NewAnimation> m_newAnimations; | 176 WillBeHeapVector<NewAnimation> m_newAnimations; |
176 Vector<AtomicString> m_cancelledAnimationNames; | 177 Vector<AtomicString> m_cancelledAnimationNames; |
177 WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>> m_suppressedAni
mationPlayers; | 178 WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>> m_suppressedAni
mationPlayers; |
178 Vector<AtomicString> m_animationsWithPauseToggled; | 179 Vector<AtomicString> m_animationsWithPauseToggled; |
179 WillBeHeapVector<UpdatedAnimation> m_animationsWithUpdates; | 180 WillBeHeapVector<UpdatedAnimation> m_animationsWithUpdates; |
180 | 181 |
181 NewTransitionMap m_newTransitions; | 182 NewTransitionMap m_newTransitions; |
182 HashSet<CSSPropertyID> m_cancelledTransitions; | 183 HashSet<CSSPropertyID> m_cancelledTransitions; |
183 | 184 |
184 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> m_active
InterpolationsForAnimations; | 185 InterpolationPipelineMap m_activeInterpolationsForAnimations; |
185 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> m_active
InterpolationsForTransitions; | 186 InterpolationPipelineMap m_activeInterpolationsForTransitions; |
186 }; | 187 }; |
187 | 188 |
188 } // namespace blink | 189 } // namespace blink |
189 | 190 |
190 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation); | 191 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation); |
191 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::UpdatedAnimation); | 192 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::UpdatedAnimation); |
192 | 193 |
193 #endif | 194 #endif |
OLD | NEW |