OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layer_animation_controller.h" | 5 #include "cc/animation/layer_animation_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "cc/animation/animation.h" | 9 #include "cc/animation/animation.h" |
10 #include "cc/animation/animation_delegate.h" | 10 #include "cc/animation/animation_delegate.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 NOTREACHED(); | 198 NOTREACHED(); |
199 } | 199 } |
200 } | 200 } |
201 } | 201 } |
202 | 202 |
203 void LayerAnimationController::UpdateState(bool start_ready_animations, | 203 void LayerAnimationController::UpdateState(bool start_ready_animations, |
204 AnimationEventsVector* events) { | 204 AnimationEventsVector* events) { |
205 if (!HasActiveValueObserver()) | 205 if (!HasActiveValueObserver()) |
206 return; | 206 return; |
207 | 207 |
| 208 DCHECK(last_tick_time_); |
208 if (start_ready_animations) | 209 if (start_ready_animations) |
209 PromoteStartedAnimations(last_tick_time_, events); | 210 PromoteStartedAnimations(last_tick_time_, events); |
210 | 211 |
211 MarkFinishedAnimations(last_tick_time_); | 212 MarkFinishedAnimations(last_tick_time_); |
212 MarkAnimationsForDeletion(last_tick_time_, events); | 213 MarkAnimationsForDeletion(last_tick_time_, events); |
213 | 214 |
214 if (start_ready_animations) { | 215 if (start_ready_animations) { |
215 StartAnimations(last_tick_time_); | 216 StartAnimations(last_tick_time_); |
216 PromoteStartedAnimations(last_tick_time_, events); | 217 PromoteStartedAnimations(last_tick_time_, events); |
217 } | 218 } |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 value_observers_); | 873 value_observers_); |
873 LayerAnimationValueObserver* obs; | 874 LayerAnimationValueObserver* obs; |
874 while ((obs = it.GetNext()) != NULL) | 875 while ((obs = it.GetNext()) != NULL) |
875 if (obs->IsActive()) | 876 if (obs->IsActive()) |
876 return true; | 877 return true; |
877 } | 878 } |
878 return false; | 879 return false; |
879 } | 880 } |
880 | 881 |
881 } // namespace cc | 882 } // namespace cc |
OLD | NEW |