OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "cc/layer_tree_host_common.h" | 7 #include "cc/layer_tree_host_common.h" |
8 | 8 |
9 #include "cc/content_layer.h" | 9 #include "cc/content_layer.h" |
10 #include "cc/content_layer_client.h" | 10 #include "cc/content_layer_client.h" |
11 #include "cc/layer.h" | 11 #include "cc/layer.h" |
12 #include "cc/layer_animation_controller.h" | 12 #include "cc/layer_animation_controller.h" |
13 #include "cc/layer_impl.h" | 13 #include "cc/layer_impl.h" |
14 #include "cc/layer_sorter.h" | 14 #include "cc/layer_sorter.h" |
15 #include "cc/math_util.h" | 15 #include "cc/math_util.h" |
16 #include "cc/proxy.h" | 16 #include "cc/proxy.h" |
17 #include "cc/single_thread_proxy.h" | 17 #include "cc/single_thread_proxy.h" |
18 #include "cc/test/animation_test_common.h" | 18 #include "cc/test/animation_test_common.h" |
19 #include "cc/test/geometry_test_utils.h" | 19 #include "cc/test/geometry_test_utils.h" |
20 #include "cc/thread.h" | 20 #include "cc/thread.h" |
21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 #include <public/WebTransformationMatrix.h> | 23 #include <public/WebTransformationMatrix.h> |
24 | 24 |
25 using namespace cc; | |
26 using namespace WebKitTests; | 25 using namespace WebKitTests; |
27 using WebKit::WebTransformationMatrix; | 26 using WebKit::WebTransformationMatrix; |
28 | 27 |
| 28 namespace cc { |
29 namespace { | 29 namespace { |
30 | 30 |
31 template<typename LayerType> | 31 template<typename LayerType> |
32 void setLayerPropertiesForTestingInternal(LayerType* layer, const WebTransformat
ionMatrix& transform, const WebTransformationMatrix& sublayerTransform, const gf
x::PointF& anchor, const gfx::PointF& position, const gfx::Size& bounds, bool pr
eserves3D) | 32 void setLayerPropertiesForTestingInternal(LayerType* layer, const WebTransformat
ionMatrix& transform, const WebTransformationMatrix& sublayerTransform, const gf
x::PointF& anchor, const gfx::PointF& position, const gfx::Size& bounds, bool pr
eserves3D) |
33 { | 33 { |
34 layer->setTransform(transform); | 34 layer->setTransform(transform); |
35 layer->setSublayerTransform(sublayerTransform); | 35 layer->setSublayerTransform(sublayerTransform); |
36 layer->setAnchorPoint(anchor); | 36 layer->setAnchorPoint(anchor); |
37 layer->setPosition(position); | 37 layer->setPosition(position); |
38 layer->setBounds(bounds); | 38 layer->setBounds(bounds); |
(...skipping 3999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4038 | 4038 |
4039 int nonexistentId = -1; | 4039 int nonexistentId = -1; |
4040 EXPECT_EQ(root, LayerTreeHostCommon::findLayerInSubtree(root.get(), root->id
())); | 4040 EXPECT_EQ(root, LayerTreeHostCommon::findLayerInSubtree(root.get(), root->id
())); |
4041 EXPECT_EQ(child, LayerTreeHostCommon::findLayerInSubtree(root.get(), child->
id())); | 4041 EXPECT_EQ(child, LayerTreeHostCommon::findLayerInSubtree(root.get(), child->
id())); |
4042 EXPECT_EQ(grandChild, LayerTreeHostCommon::findLayerInSubtree(root.get(), gr
andChild->id())); | 4042 EXPECT_EQ(grandChild, LayerTreeHostCommon::findLayerInSubtree(root.get(), gr
andChild->id())); |
4043 EXPECT_EQ(maskLayer, LayerTreeHostCommon::findLayerInSubtree(root.get(), mas
kLayer->id())); | 4043 EXPECT_EQ(maskLayer, LayerTreeHostCommon::findLayerInSubtree(root.get(), mas
kLayer->id())); |
4044 EXPECT_EQ(replicaLayer, LayerTreeHostCommon::findLayerInSubtree(root.get(),
replicaLayer->id())); | 4044 EXPECT_EQ(replicaLayer, LayerTreeHostCommon::findLayerInSubtree(root.get(),
replicaLayer->id())); |
4045 EXPECT_EQ(0, LayerTreeHostCommon::findLayerInSubtree(root.get(), nonexistent
Id)); | 4045 EXPECT_EQ(0, LayerTreeHostCommon::findLayerInSubtree(root.get(), nonexistent
Id)); |
4046 } | 4046 } |
4047 | 4047 |
4048 } // anonymous namespace | 4048 } // namespace |
| 4049 } // namespace cc |
OLD | NEW |