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_animator.h" | 5 #include "ui/compositor/layer_animator.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "ui/compositor/layer.h" | 13 #include "ui/compositor/layer.h" |
14 #include "ui/compositor/layer_animation_delegate.h" | 14 #include "ui/compositor/layer_animation_delegate.h" |
15 #include "ui/compositor/layer_animation_element.h" | 15 #include "ui/compositor/layer_animation_element.h" |
16 #include "ui/compositor/layer_animation_sequence.h" | 16 #include "ui/compositor/layer_animation_sequence.h" |
17 #include "ui/compositor/layer_animator_collection.h" | 17 #include "ui/compositor/layer_animator_collection.h" |
18 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 18 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
19 #include "ui/compositor/scoped_layer_animation_settings.h" | 19 #include "ui/compositor/scoped_layer_animation_settings.h" |
20 #include "ui/compositor/test/context_factories_for_test.h" | 20 #include "ui/compositor/test/context_factories_for_test.h" |
21 #include "ui/compositor/test/layer_animator_test_controller.h" | 21 #include "ui/compositor/test/layer_animator_test_controller.h" |
22 #include "ui/compositor/test/test_compositor_host.h" | 22 #include "ui/compositor/test/test_compositor_host.h" |
23 #include "ui/compositor/test/test_layer_animation_delegate.h" | 23 #include "ui/compositor/test/test_layer_animation_delegate.h" |
24 #include "ui/compositor/test/test_layer_animation_observer.h" | 24 #include "ui/compositor/test/test_layer_animation_observer.h" |
25 #include "ui/compositor/test/test_utils.h" | 25 #include "ui/compositor/test/test_utils.h" |
26 #include "ui/gfx/frame_time.h" | 26 #include "ui/gfx/frame_time.h" |
27 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/geometry/rect.h" |
28 #include "ui/gfx/transform.h" | 28 #include "ui/gfx/transform.h" |
29 | 29 |
30 namespace ui { | 30 namespace ui { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 // Converts |color| to a string. Each component of the color is separated by a | 34 // Converts |color| to a string. Each component of the color is separated by a |
35 // space and the order if A R G B. | 35 // space and the order if A R G B. |
36 std::string ColorToString(SkColor color) { | 36 std::string ColorToString(SkColor color) { |
37 return base::StringPrintf("%d %d %d %d", SkColorGetA(color), | 37 return base::StringPrintf("%d %d %d %d", SkColorGetA(color), |
(...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2605 | 2605 |
2606 root_2.Add(&layer); | 2606 root_2.Add(&layer); |
2607 EXPECT_FALSE(compositor_1->layer_animator_collection()->HasActiveAnimators()); | 2607 EXPECT_FALSE(compositor_1->layer_animator_collection()->HasActiveAnimators()); |
2608 EXPECT_TRUE(compositor_2->layer_animator_collection()->HasActiveAnimators()); | 2608 EXPECT_TRUE(compositor_2->layer_animator_collection()->HasActiveAnimators()); |
2609 host_2.reset(); | 2609 host_2.reset(); |
2610 host_1.reset(); | 2610 host_1.reset(); |
2611 TerminateContextFactoryForTests(); | 2611 TerminateContextFactoryForTests(); |
2612 } | 2612 } |
2613 | 2613 |
2614 } // namespace ui | 2614 } // namespace ui |
OLD | NEW |