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 "cc/layer_tree_host_impl.h" | 5 #include "cc/layer_tree_host_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 EXPECT_FALSE(m_didRequestCommit); | 1042 EXPECT_FALSE(m_didRequestCommit); |
1043 } | 1043 } |
1044 | 1044 |
1045 TEST_P(LayerTreeHostImplTest, scrollNonCompositedRoot) | 1045 TEST_P(LayerTreeHostImplTest, scrollNonCompositedRoot) |
1046 { | 1046 { |
1047 // Test the configuration where a non-composited root layer is embedded in a | 1047 // Test the configuration where a non-composited root layer is embedded in a |
1048 // scrollable outer layer. | 1048 // scrollable outer layer. |
1049 gfx::Size surfaceSize(10, 10); | 1049 gfx::Size surfaceSize(10, 10); |
1050 | 1050 |
1051 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(1); | 1051 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(1); |
1052 contentLayer->setUseLCDText(true); | 1052 contentLayer->setCanUseLCDText(true); |
1053 contentLayer->setDrawsContent(true); | 1053 contentLayer->setDrawsContent(true); |
1054 contentLayer->setPosition(gfx::PointF(0, 0)); | 1054 contentLayer->setPosition(gfx::PointF(0, 0)); |
1055 contentLayer->setAnchorPoint(gfx::PointF(0, 0)); | 1055 contentLayer->setAnchorPoint(gfx::PointF(0, 0)); |
1056 contentLayer->setBounds(surfaceSize); | 1056 contentLayer->setBounds(surfaceSize); |
1057 contentLayer->setContentBounds(gfx::Size(surfaceSize.width() * 2, surfaceSiz
e.height() * 2)); | 1057 contentLayer->setContentBounds(gfx::Size(surfaceSize.width() * 2, surfaceSiz
e.height() * 2)); |
1058 contentLayer->setContentsScale(2, 2); | 1058 contentLayer->setContentsScale(2, 2); |
1059 | 1059 |
1060 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(2); | 1060 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(2); |
1061 scrollLayer->setScrollable(true); | 1061 scrollLayer->setScrollable(true); |
1062 scrollLayer->setMaxScrollOffset(gfx::Vector2d(surfaceSize.width(), surfaceSi
ze.height())); | 1062 scrollLayer->setMaxScrollOffset(gfx::Vector2d(surfaceSize.width(), surfaceSi
ze.height())); |
(...skipping 3372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4435 testCaseIndex++; | 4435 testCaseIndex++; |
4436 } | 4436 } |
4437 } | 4437 } |
4438 | 4438 |
4439 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, | 4439 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, |
4440 LayerTreeHostImplTest, | 4440 LayerTreeHostImplTest, |
4441 ::testing::Values(false, true)); | 4441 ::testing::Values(false, true)); |
4442 | 4442 |
4443 } // namespace | 4443 } // namespace |
4444 } // namespace cc | 4444 } // namespace cc |
OLD | NEW |