OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/animation.h" | 5 #include "cc/animation/animation.h" |
6 #include "ui/compositor/layer_animation_sequence.h" | 6 #include "ui/compositor/layer_animation_sequence.h" |
7 #include "ui/compositor/test/layer_animator_test_controller.h" | 7 #include "ui/compositor/test/layer_animator_test_controller.h" |
8 #include "ui/gfx/frame_time.h" | 8 #include "ui/gfx/frame_time.h" |
9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 threaded_properties.push_back(cc::Animation::Transform); | 34 threaded_properties.push_back(cc::Animation::Transform); |
35 | 35 |
36 for (size_t i = 0; i < threaded_properties.size(); i++) { | 36 for (size_t i = 0; i < threaded_properties.size(); i++) { |
37 LayerAnimationElement::AnimatableProperty animatable_property = | 37 LayerAnimationElement::AnimatableProperty animatable_property = |
38 LayerAnimationElement::ToAnimatableProperty(threaded_properties[i]); | 38 LayerAnimationElement::ToAnimatableProperty(threaded_properties[i]); |
39 LayerAnimationSequence* sequence = GetRunningSequence(animatable_property); | 39 LayerAnimationSequence* sequence = GetRunningSequence(animatable_property); |
40 if (!sequence) | 40 if (!sequence) |
41 continue; | 41 continue; |
42 | 42 |
43 LayerAnimationElement* element = sequence->CurrentElement(); | 43 LayerAnimationElement* element = sequence->CurrentElement(); |
44 if (element->properties().find(animatable_property) == | 44 if (!(element->properties() & animatable_property)) |
45 element->properties().end()) | |
46 continue; | 45 continue; |
47 | 46 |
48 if (!element->Started() || | 47 if (!element->Started() || |
49 element->effective_start_time() != base::TimeTicks()) | 48 element->effective_start_time() != base::TimeTicks()) |
50 continue; | 49 continue; |
51 | 50 |
52 animator_->OnThreadedAnimationStarted(cc::AnimationEvent( | 51 animator_->OnThreadedAnimationStarted(cc::AnimationEvent( |
53 cc::AnimationEvent::Started, | 52 cc::AnimationEvent::Started, |
54 0, | 53 0, |
55 element->animation_group_id(), | 54 element->animation_group_id(), |
56 threaded_properties[i], | 55 threaded_properties[i], |
57 (gfx::FrameTime::Now() - base::TimeTicks()).InSecondsF())); | 56 (gfx::FrameTime::Now() - base::TimeTicks()).InSecondsF())); |
58 } | 57 } |
59 } | 58 } |
60 | 59 |
61 } // namespace ui | 60 } // namespace ui |
OLD | NEW |