| 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_impl.h" | 7 #include "cc/layer_tree_host_impl.h" |
| 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 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 // scrollable outer layer. | 1038 // scrollable outer layer. |
| 1039 IntSize surfaceSize(10, 10); | 1039 IntSize surfaceSize(10, 10); |
| 1040 | 1040 |
| 1041 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(1); | 1041 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(1); |
| 1042 contentLayer->setUseLCDText(true); | 1042 contentLayer->setUseLCDText(true); |
| 1043 contentLayer->setDrawsContent(true); | 1043 contentLayer->setDrawsContent(true); |
| 1044 contentLayer->setPosition(FloatPoint(0, 0)); | 1044 contentLayer->setPosition(FloatPoint(0, 0)); |
| 1045 contentLayer->setAnchorPoint(FloatPoint(0, 0)); | 1045 contentLayer->setAnchorPoint(FloatPoint(0, 0)); |
| 1046 contentLayer->setBounds(surfaceSize); | 1046 contentLayer->setBounds(surfaceSize); |
| 1047 contentLayer->setContentBounds(IntSize(surfaceSize.width() * 2, surfaceSize.
height() * 2)); | 1047 contentLayer->setContentBounds(IntSize(surfaceSize.width() * 2, surfaceSize.
height() * 2)); |
| 1048 contentLayer->setContentsScale(2, 2); |
| 1048 | 1049 |
| 1049 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(2); | 1050 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(2); |
| 1050 scrollLayer->setScrollable(true); | 1051 scrollLayer->setScrollable(true); |
| 1051 scrollLayer->setMaxScrollPosition(surfaceSize); | 1052 scrollLayer->setMaxScrollPosition(surfaceSize); |
| 1052 scrollLayer->setBounds(surfaceSize); | 1053 scrollLayer->setBounds(surfaceSize); |
| 1053 scrollLayer->setContentBounds(surfaceSize); | 1054 scrollLayer->setContentBounds(surfaceSize); |
| 1054 scrollLayer->setPosition(FloatPoint(0, 0)); | 1055 scrollLayer->setPosition(FloatPoint(0, 0)); |
| 1055 scrollLayer->setAnchorPoint(FloatPoint(0, 0)); | 1056 scrollLayer->setAnchorPoint(FloatPoint(0, 0)); |
| 1056 scrollLayer->addChild(contentLayer.Pass()); | 1057 scrollLayer->addChild(contentLayer.Pass()); |
| 1057 | 1058 |
| (...skipping 3347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4405 verifyRenderPassTestData(removeRenderPassesCases[testCaseIndex], testDat
a); | 4406 verifyRenderPassTestData(removeRenderPassesCases[testCaseIndex], testDat
a); |
| 4406 testCaseIndex++; | 4407 testCaseIndex++; |
| 4407 } | 4408 } |
| 4408 } | 4409 } |
| 4409 | 4410 |
| 4410 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, | 4411 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, |
| 4411 LayerTreeHostImplTest, | 4412 LayerTreeHostImplTest, |
| 4412 ::testing::Values(false, true)); | 4413 ::testing::Values(false, true)); |
| 4413 | 4414 |
| 4414 } // namespace | 4415 } // namespace |
| OLD | NEW |