OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/compositor/layer_animation_sequence.h" | 5 #include "ui/compositor/layer_animation_sequence.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 | 9 |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| 11 #include "cc/animation/animation_events.h" |
11 #include "cc/animation/animation_id_provider.h" | 12 #include "cc/animation/animation_id_provider.h" |
12 #include "ui/compositor/layer_animation_delegate.h" | 13 #include "ui/compositor/layer_animation_delegate.h" |
13 #include "ui/compositor/layer_animation_element.h" | 14 #include "ui/compositor/layer_animation_element.h" |
14 #include "ui/compositor/layer_animation_observer.h" | 15 #include "ui/compositor/layer_animation_observer.h" |
15 | 16 |
16 namespace ui { | 17 namespace ui { |
17 | 18 |
18 LayerAnimationSequence::LayerAnimationSequence() | 19 LayerAnimationSequence::LayerAnimationSequence() |
19 : properties_(LayerAnimationElement::UNKNOWN), | 20 : properties_(LayerAnimationElement::UNKNOWN), |
20 is_cyclic_(false), | 21 is_cyclic_(false), |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 280 |
280 LayerAnimationElement* LayerAnimationSequence::CurrentElement() const { | 281 LayerAnimationElement* LayerAnimationSequence::CurrentElement() const { |
281 if (elements_.empty()) | 282 if (elements_.empty()) |
282 return NULL; | 283 return NULL; |
283 | 284 |
284 size_t current_index = last_element_ % elements_.size(); | 285 size_t current_index = last_element_ % elements_.size(); |
285 return elements_[current_index].get(); | 286 return elements_[current_index].get(); |
286 } | 287 } |
287 | 288 |
288 } // namespace ui | 289 } // namespace ui |
OLD | NEW |