Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/layers/layer_utils.h" | 5 #include "cc/layers/layer_utils.h" |
| 6 | 6 |
| 7 #include "cc/animation/animation_host.h" | 7 #include "cc/animation/animation_host.h" |
| 8 #include "cc/animation/animation_id_provider.h" | 8 #include "cc/animation/animation_id_provider.h" |
| 9 #include "cc/animation/transform_operations.h" | 9 #include "cc/animation/transform_operations.h" |
| 10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
| 11 #include "cc/test/animation_test_common.h" | 11 #include "cc/test/animation_test_common.h" |
| 12 #include "cc/test/fake_impl_task_runner_provider.h" | 12 #include "cc/test/fake_impl_task_runner_provider.h" |
| 13 #include "cc/test/fake_layer_tree_host_impl.h" | 13 #include "cc/test/fake_layer_tree_host_impl.h" |
| 14 #include "cc/test/test_shared_bitmap_manager.h" | 14 #include "cc/test/test_shared_bitmap_manager.h" |
| 15 #include "cc/test/test_task_graph_runner.h" | 15 #include "cc/test/test_task_graph_runner.h" |
| 16 #include "cc/trees/layer_tree_impl.h" | 16 #include "cc/trees/layer_tree_impl.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "ui/gfx/geometry/box_f.h" | 18 #include "ui/gfx/geometry/box_f.h" |
| 19 #include "ui/gfx/test/gfx_util.h" | 19 #include "ui/gfx/test/gfx_util.h" |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 float diagonal(float width, float height) { | 24 float diagonal(float width, float height) { |
| 25 return std::sqrt(width * width + height * height); | 25 return std::sqrt(width * width + height * height); |
| 26 } | 26 } |
| 27 | 27 |
| 28 class LayerTreeSettingsForAnimationBoundsTest : public LayerTreeSettings { | 28 class LayerTreeSettingsForAnimationBoundsTest : public LayerTreeSettings { |
| 29 public: | 29 public: |
| 30 LayerTreeSettingsForAnimationBoundsTest() { | 30 LayerTreeSettingsForAnimationBoundsTest() {} |
|
ajuma
2016/03/11 00:40:54
This class doesn't do anything now, so it can be d
loyso (OOO)
2016/03/11 03:26:57
Done.
| |
| 31 use_compositor_animation_timelines = true; | |
| 32 } | |
| 33 }; | 31 }; |
| 34 | 32 |
| 35 class LayerUtilsGetAnimationBoundsTest : public testing::Test { | 33 class LayerUtilsGetAnimationBoundsTest : public testing::Test { |
| 36 public: | 34 public: |
| 37 LayerUtilsGetAnimationBoundsTest() | 35 LayerUtilsGetAnimationBoundsTest() |
| 38 : host_impl_(LayerTreeSettingsForAnimationBoundsTest(), | 36 : host_impl_(LayerTreeSettingsForAnimationBoundsTest(), |
| 39 &task_runner_provider_, | 37 &task_runner_provider_, |
| 40 &shared_bitmap_manager_, | 38 &shared_bitmap_manager_, |
| 41 &task_graph_runner_), | 39 &task_graph_runner_), |
| 42 root_(CreateTwoForkTree(&host_impl_)), | 40 root_(CreateTwoForkTree(&host_impl_)), |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 569 // Same as RotateXWithPerspectiveUnderAncestorsWithPositionOr2DTransform test, | 567 // Same as RotateXWithPerspectiveUnderAncestorsWithPositionOr2DTransform test, |
| 570 // except for the perspective calculations. | 568 // except for the perspective calculations. |
| 571 | 569 |
| 572 gfx::BoxF expected(295.f, 180.f, -25.f, 50.f, 50.f, 50.f); | 570 gfx::BoxF expected(295.f, 180.f, -25.f, 50.f, 50.f, 50.f); |
| 573 EXPECT_BOXF_EQ(expected, box); | 571 EXPECT_BOXF_EQ(expected, box); |
| 574 } | 572 } |
| 575 | 573 |
| 576 } // namespace | 574 } // namespace |
| 577 | 575 |
| 578 } // namespace cc | 576 } // namespace cc |
| OLD | NEW |