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 #include "cc/animation/element_animations.h" | 5 #include "cc/animation/element_animations.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 // Update impl client state. | 152 // Update impl client state. |
| 153 if (needs_update_impl_client_state_) | 153 if (needs_update_impl_client_state_) |
| 154 element_animations_impl->UpdateClientAnimationState(); | 154 element_animations_impl->UpdateClientAnimationState(); |
| 155 needs_update_impl_client_state_ = false; | 155 needs_update_impl_client_state_ = false; |
| 156 | 156 |
| 157 element_animations_impl->UpdateActivation(ActivationType::NORMAL); | 157 element_animations_impl->UpdateActivation(ActivationType::NORMAL); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void ElementAnimations::Animate(base::TimeTicks monotonic_time) { | 160 void ElementAnimations::Animate(base::TimeTicks monotonic_time) { |
| 161 DCHECK(!monotonic_time.is_null()); | 161 DCHECK(!monotonic_time.is_null()); |
| 162 if (!has_element_in_active_list() && !has_element_in_pending_list()) | 162 if (!has_element_in_active_list() && !has_element_in_pending_list()) { |
| 163 animation_host_->DidDeactivateElementAnimations(this); | |
|
loyso (OOO)
2016/11/27 23:36:55
if you call host_->UnregisterElement, ElementAnima
junchao.han
2016/11/28 04:09:03
Thanks for the comments. Not DidActivateElementAni
| |
| 163 return; | 164 return; |
| 165 } | |
| 164 | 166 |
| 165 for (auto& player : players_list_) { | 167 for (auto& player : players_list_) { |
| 166 if (player.needs_to_start_animations()) | 168 if (player.needs_to_start_animations()) |
| 167 player.StartAnimations(monotonic_time); | 169 player.StartAnimations(monotonic_time); |
| 168 } | 170 } |
| 169 | 171 |
| 170 for (auto& player : players_list_) | 172 for (auto& player : players_list_) |
| 171 player.TickAnimations(monotonic_time); | 173 player.TickAnimations(monotonic_time); |
| 172 | 174 |
| 173 last_tick_time_ = monotonic_time; | 175 last_tick_time_ = monotonic_time; |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 566 if (animation_host()) { | 568 if (animation_host()) { |
| 567 DCHECK(animation_host()->mutator_host_client()); | 569 DCHECK(animation_host()->mutator_host_client()); |
| 568 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( | 570 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( |
| 569 element_id()); | 571 element_id()); |
| 570 } | 572 } |
| 571 | 573 |
| 572 return gfx::ScrollOffset(); | 574 return gfx::ScrollOffset(); |
| 573 } | 575 } |
| 574 | 576 |
| 575 } // namespace cc | 577 } // namespace cc |
| OLD | NEW |