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 "CCLayerTreeHostCommon.h" | 7 #include "CCLayerTreeHostCommon.h" |
8 | 8 |
9 #include "CCAnimationTestCommon.h" | 9 #include "CCAnimationTestCommon.h" |
10 #include "CCGeometryTestUtils.h" | 10 #include "CCGeometryTestUtils.h" |
11 #include "CCLayerAnimationController.h" | 11 #include "CCLayerAnimationController.h" |
12 #include "CCLayerImpl.h" | 12 #include "CCLayerImpl.h" |
13 #include "CCLayerSorter.h" | 13 #include "CCLayerSorter.h" |
14 #include "CCMathUtil.h" | 14 #include "CCMathUtil.h" |
15 #include "CCProxy.h" | 15 #include "CCProxy.h" |
16 #include "CCSingleThreadProxy.h" | 16 #include "CCSingleThreadProxy.h" |
17 #include "CCThread.h" | 17 #include "CCThread.h" |
18 #include "ContentLayerChromium.h" | 18 #include "ContentLayerChromium.h" |
19 #include "ContentLayerChromiumClient.h" | 19 #include "ContentLayerChromiumClient.h" |
20 #include "LayerChromium.h" | 20 #include "LayerChromium.h" |
21 | 21 |
22 #include <gmock/gmock.h> | 22 #include <gmock/gmock.h> |
23 #include <gtest/gtest.h> | 23 #include <gtest/gtest.h> |
24 #include <public/WebTransformationMatrix.h> | 24 #include <public/WebTransformationMatrix.h> |
25 | 25 |
26 using namespace WebCore; | 26 using namespace cc; |
27 using namespace WebKitTests; | 27 using namespace WebKitTests; |
28 using WebKit::WebTransformationMatrix; | 28 using WebKit::WebTransformationMatrix; |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 template<typename LayerType> | 32 template<typename LayerType> |
33 void setLayerPropertiesForTesting(LayerType* layer, const WebTransformationMatri
x& transform, const WebTransformationMatrix& sublayerTransform, const FloatPoint
& anchor, const FloatPoint& position, const IntSize& bounds, bool preserves3D) | 33 void setLayerPropertiesForTesting(LayerType* layer, const WebTransformationMatri
x& transform, const WebTransformationMatrix& sublayerTransform, const FloatPoint
& anchor, const FloatPoint& position, const IntSize& bounds, bool preserves3D) |
34 { | 34 { |
35 layer->setTransform(transform); | 35 layer->setTransform(transform); |
36 layer->setSublayerTransform(sublayerTransform); | 36 layer->setSublayerTransform(sublayerTransform); |
(...skipping 3488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3525 int nonexistentId = -1; | 3525 int nonexistentId = -1; |
3526 EXPECT_EQ(root, CCLayerTreeHostCommon::findLayerInSubtree(root.get(), root->
id())); | 3526 EXPECT_EQ(root, CCLayerTreeHostCommon::findLayerInSubtree(root.get(), root->
id())); |
3527 EXPECT_EQ(child, CCLayerTreeHostCommon::findLayerInSubtree(root.get(), child
->id())); | 3527 EXPECT_EQ(child, CCLayerTreeHostCommon::findLayerInSubtree(root.get(), child
->id())); |
3528 EXPECT_EQ(grandChild, CCLayerTreeHostCommon::findLayerInSubtree(root.get(),
grandChild->id())); | 3528 EXPECT_EQ(grandChild, CCLayerTreeHostCommon::findLayerInSubtree(root.get(),
grandChild->id())); |
3529 EXPECT_EQ(maskLayer, CCLayerTreeHostCommon::findLayerInSubtree(root.get(), m
askLayer->id())); | 3529 EXPECT_EQ(maskLayer, CCLayerTreeHostCommon::findLayerInSubtree(root.get(), m
askLayer->id())); |
3530 EXPECT_EQ(replicaLayer, CCLayerTreeHostCommon::findLayerInSubtree(root.get()
, replicaLayer->id())); | 3530 EXPECT_EQ(replicaLayer, CCLayerTreeHostCommon::findLayerInSubtree(root.get()
, replicaLayer->id())); |
3531 EXPECT_EQ(0, CCLayerTreeHostCommon::findLayerInSubtree(root.get(), nonexiste
ntId)); | 3531 EXPECT_EQ(0, CCLayerTreeHostCommon::findLayerInSubtree(root.get(), nonexiste
ntId)); |
3532 } | 3532 } |
3533 | 3533 |
3534 } // namespace | 3534 } // namespace |
OLD | NEW |