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 "CCLayerTreeHost.h" | 7 #include "CCLayerTreeHost.h" |
8 | 8 |
9 #include "CCGeometryTestUtils.h" | 9 #include "CCGeometryTestUtils.h" |
10 #include "CCGraphicsContext.h" | 10 #include "CCGraphicsContext.h" |
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1308 EXPECT_NEAR(impl->deviceScaleFactor(), 1.5, 0.00001); | 1308 EXPECT_NEAR(impl->deviceScaleFactor(), 1.5, 0.00001); |
1309 | 1309 |
1310 // Both layers are on impl. | 1310 // Both layers are on impl. |
1311 ASSERT_EQ(1u, impl->rootLayer()->children().size()); | 1311 ASSERT_EQ(1u, impl->rootLayer()->children().size()); |
1312 | 1312 |
1313 // Device viewport is scaled. | 1313 // Device viewport is scaled. |
1314 EXPECT_EQ(IntSize(40, 40), impl->layoutViewportSize()); | 1314 EXPECT_EQ(IntSize(40, 40), impl->layoutViewportSize()); |
1315 EXPECT_EQ(IntSize(60, 60), impl->deviceViewportSize()); | 1315 EXPECT_EQ(IntSize(60, 60), impl->deviceViewportSize()); |
1316 | 1316 |
1317 CCLayerImpl* root = impl->rootLayer(); | 1317 CCLayerImpl* root = impl->rootLayer(); |
1318 CCLayerImpl* child = impl->rootLayer()->children()[0].get(); | 1318 CCLayerImpl* child = impl->rootLayer()->children()[0]; |
1319 | 1319 |
1320 // Positions remain in layout pixels. | 1320 // Positions remain in layout pixels. |
1321 EXPECT_EQ(IntPoint(0, 0), root->position()); | 1321 EXPECT_EQ(IntPoint(0, 0), root->position()); |
1322 EXPECT_EQ(IntPoint(2, 2), child->position()); | 1322 EXPECT_EQ(IntPoint(2, 2), child->position()); |
1323 | 1323 |
1324 // Compute all the layer transforms for the frame. | 1324 // Compute all the layer transforms for the frame. |
1325 MockLayerTreeHostImpl::CCLayerList renderSurfaceLayerList; | 1325 MockLayerTreeHostImpl::CCLayerList renderSurfaceLayerList; |
1326 mockImpl->calculateRenderSurfaceLayerList(renderSurfaceLayerList); | 1326 mockImpl->calculateRenderSurfaceLayerList(renderSurfaceLayerList); |
1327 | 1327 |
1328 // Both layers should be drawing into the root render surface. | 1328 // Both layers should be drawing into the root render surface. |
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2988 int m_numCommitComplete; | 2988 int m_numCommitComplete; |
2989 int m_numDrawLayers; | 2989 int m_numDrawLayers; |
2990 }; | 2990 }; |
2991 | 2991 |
2992 TEST_F(CCLayerTreeHostTestContinuousAnimate, runMultiThread) | 2992 TEST_F(CCLayerTreeHostTestContinuousAnimate, runMultiThread) |
2993 { | 2993 { |
2994 runTest(true); | 2994 runTest(true); |
2995 } | 2995 } |
2996 | 2996 |
2997 } // namespace | 2997 } // namespace |
OLD | NEW |