Chromium Code Reviews| 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 CC_ANIMATION_ELEMENT_ANIMATIONS_H_ | 5 #ifndef CC_ANIMATION_ELEMENT_ANIMATIONS_H_ |
| 6 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_ | 6 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_ |
| 7 | 7 |
| 8 #include <bitset> | 8 #include <bitset> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 bool notify_pending_elements); | 217 bool notify_pending_elements); |
| 218 void NotifyClientFilterAnimated(const FilterOperations& filter, | 218 void NotifyClientFilterAnimated(const FilterOperations& filter, |
| 219 bool notify_active_elements, | 219 bool notify_active_elements, |
| 220 bool notify_pending_elements); | 220 bool notify_pending_elements); |
| 221 void NotifyClientScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset, | 221 void NotifyClientScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset, |
| 222 bool notify_active_elements, | 222 bool notify_active_elements, |
| 223 bool notify_pending_elements); | 223 bool notify_pending_elements); |
| 224 | 224 |
| 225 void NotifyClientAnimationWaitingForDeletion(); | 225 void NotifyClientAnimationWaitingForDeletion(); |
| 226 | 226 |
| 227 void NotifyClientTransformIsPotentiallyAnimatingChanged( | 227 void NotifyClientAnimationChanged( |
| 228 bool notify_active_elements, | 228 TargetProperty::Type property, |
| 229 bool notify_pending_elements); | 229 ElementListType list_type, |
| 230 bool notify_elements_about_potential_animation, | |
| 231 bool notify_elements_about_running_animation); | |
| 230 | 232 |
| 231 void UpdatePotentiallyAnimatingTransform(); | 233 void UpdateClientAnimationState(TargetProperty::Type property); |
| 232 | |
| 233 void NotifyClientOpacityAnimationChanged( | |
| 234 bool notify_active_elements_about_potential_animation, | |
| 235 bool notify_active_elements_about_running_animation, | |
| 236 bool notify_pending_elements_about_potential_aniamtion, | |
| 237 bool notify_pending_elements_about_running_animation); | |
| 238 | |
| 239 void UpdateAnimatingOpacity(); | |
| 240 | 234 |
| 241 void OnFilterAnimated(ElementListType list_type, | 235 void OnFilterAnimated(ElementListType list_type, |
| 242 const FilterOperations& filters); | 236 const FilterOperations& filters); |
| 243 void OnOpacityAnimated(ElementListType list_type, float opacity); | 237 void OnOpacityAnimated(ElementListType list_type, float opacity); |
| 244 void OnTransformAnimated(ElementListType list_type, | 238 void OnTransformAnimated(ElementListType list_type, |
| 245 const gfx::Transform& transform); | 239 const gfx::Transform& transform); |
| 246 void OnScrollOffsetAnimated(ElementListType list_type, | 240 void OnScrollOffsetAnimated(ElementListType list_type, |
| 247 const gfx::ScrollOffset& scroll_offset); | 241 const gfx::ScrollOffset& scroll_offset); |
| 248 void OnAnimationWaitingForDeletion(); | 242 void OnAnimationWaitingForDeletion(); |
| 249 void OnTransformIsPotentiallyAnimatingChanged(ElementListType list_type, | 243 void IsAnimatingChanged(ElementListType list_type, |
| 250 bool is_animating); | 244 TargetProperty::Type property, |
| 251 void OnOpacityIsAnimatingChanged(ElementListType list_type, | 245 AnimationChangeType change_type, |
| 252 AnimationChangeType change_type, | 246 bool is_animating); |
| 253 bool is_animating); | |
| 254 gfx::ScrollOffset ScrollOffsetForAnimation() const; | 247 gfx::ScrollOffset ScrollOffsetForAnimation() const; |
| 255 | 248 |
| 256 void NotifyPlayersAnimationStarted(base::TimeTicks monotonic_time, | 249 void NotifyPlayersAnimationStarted(base::TimeTicks monotonic_time, |
| 257 TargetProperty::Type target_property, | 250 TargetProperty::Type target_property, |
| 258 int group); | 251 int group); |
| 259 void NotifyPlayersAnimationFinished(base::TimeTicks monotonic_time, | 252 void NotifyPlayersAnimationFinished(base::TimeTicks monotonic_time, |
| 260 TargetProperty::Type target_property, | 253 TargetProperty::Type target_property, |
| 261 int group); | 254 int group); |
| 262 void NotifyPlayersAnimationAborted(base::TimeTicks monotonic_time, | 255 void NotifyPlayersAnimationAborted(base::TimeTicks monotonic_time, |
| 263 TargetProperty::Type target_property, | 256 TargetProperty::Type target_property, |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 280 | 273 |
| 281 bool has_element_in_active_list_; | 274 bool has_element_in_active_list_; |
| 282 bool has_element_in_pending_list_; | 275 bool has_element_in_pending_list_; |
| 283 | 276 |
| 284 // Only try to start animations when new animations are added or when the | 277 // Only try to start animations when new animations are added or when the |
| 285 // previous attempt at starting animations failed to start all animations. | 278 // previous attempt at starting animations failed to start all animations. |
| 286 bool needs_to_start_animations_; | 279 bool needs_to_start_animations_; |
| 287 | 280 |
| 288 bool scroll_offset_animation_was_interrupted_; | 281 bool scroll_offset_animation_was_interrupted_; |
| 289 | 282 |
| 290 bool potentially_animating_transform_for_active_elements_; | 283 struct AnimationStateForClient { |
|
ajuma
2016/05/18 22:03:30
nit: PropertyAnimationState might be a better name
jaydasika
2016/05/19 00:56:42
Done.
| |
| 291 bool potentially_animating_transform_for_pending_elements_; | 284 bool currently_running_for_active_elements = false; |
| 285 bool currently_running_for_pending_elements = false; | |
| 286 bool potentially_animating_for_active_elements = false; | |
| 287 bool potentially_animating_for_pending_elements = false; | |
| 288 void Clear() { | |
| 289 currently_running_for_active_elements = false; | |
| 290 currently_running_for_pending_elements = false; | |
| 291 potentially_animating_for_active_elements = false; | |
| 292 potentially_animating_for_pending_elements = false; | |
| 293 } | |
| 294 }; | |
| 292 | 295 |
| 293 bool currently_running_opacity_animation_for_active_elements_; | 296 struct AnimationStateForClient opacity_animation_; |
|
ajuma
2016/05/18 22:03:30
opacity_animation_state_
jaydasika
2016/05/19 00:56:42
Done.
| |
| 294 bool currently_running_opacity_animation_for_pending_elements_; | 297 struct AnimationStateForClient transform_animation_; |
| 295 bool potentially_animating_opacity_for_active_elements_; | |
| 296 bool potentially_animating_opacity_for_pending_elements_; | |
| 297 | 298 |
| 298 DISALLOW_COPY_AND_ASSIGN(ElementAnimations); | 299 DISALLOW_COPY_AND_ASSIGN(ElementAnimations); |
| 299 }; | 300 }; |
| 300 | 301 |
| 301 } // namespace cc | 302 } // namespace cc |
| 302 | 303 |
| 303 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_ | 304 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_ |
| OLD | NEW |