| 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 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 EXPECT_FALSE(m_didRequestCommit); | 1113 EXPECT_FALSE(m_didRequestCommit); |
| 1114 } | 1114 } |
| 1115 | 1115 |
| 1116 TEST_P(LayerTreeHostImplTest, scrollNonCompositedRoot) | 1116 TEST_P(LayerTreeHostImplTest, scrollNonCompositedRoot) |
| 1117 { | 1117 { |
| 1118 // Test the configuration where a non-composited root layer is embedded in a | 1118 // Test the configuration where a non-composited root layer is embedded in a |
| 1119 // scrollable outer layer. | 1119 // scrollable outer layer. |
| 1120 gfx::Size surfaceSize(10, 10); | 1120 gfx::Size surfaceSize(10, 10); |
| 1121 | 1121 |
| 1122 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(m_hostImpl->activeTre
e(), 1); | 1122 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(m_hostImpl->activeTre
e(), 1); |
| 1123 contentLayer->setUseLCDText(true); | |
| 1124 contentLayer->setDrawsContent(true); | 1123 contentLayer->setDrawsContent(true); |
| 1125 contentLayer->setPosition(gfx::PointF(0, 0)); | 1124 contentLayer->setPosition(gfx::PointF(0, 0)); |
| 1126 contentLayer->setAnchorPoint(gfx::PointF(0, 0)); | 1125 contentLayer->setAnchorPoint(gfx::PointF(0, 0)); |
| 1127 contentLayer->setBounds(surfaceSize); | 1126 contentLayer->setBounds(surfaceSize); |
| 1128 contentLayer->setContentBounds(gfx::Size(surfaceSize.width() * 2, surfaceSiz
e.height() * 2)); | 1127 contentLayer->setContentBounds(gfx::Size(surfaceSize.width() * 2, surfaceSiz
e.height() * 2)); |
| 1129 contentLayer->setContentsScale(2, 2); | 1128 contentLayer->setContentsScale(2, 2); |
| 1130 | 1129 |
| 1131 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(m_hostImpl->activeTree
(), 2); | 1130 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(m_hostImpl->activeTree
(), 2); |
| 1132 scrollLayer->setScrollable(true); | 1131 scrollLayer->setScrollable(true); |
| 1133 scrollLayer->setMaxScrollOffset(gfx::Vector2d(surfaceSize.width(), surfaceSi
ze.height())); | 1132 scrollLayer->setMaxScrollOffset(gfx::Vector2d(surfaceSize.width(), surfaceSi
ze.height())); |
| (...skipping 3795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4929 gfx::Rect noDamage = gfx::Rect(m_hostImpl->deviceViewportSize()); | 4928 gfx::Rect noDamage = gfx::Rect(m_hostImpl->deviceViewportSize()); |
| 4930 drawFrameAndTestDamage(noDamage); | 4929 drawFrameAndTestDamage(noDamage); |
| 4931 } | 4930 } |
| 4932 | 4931 |
| 4933 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, | 4932 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, |
| 4934 LayerTreeHostImplTest, | 4933 LayerTreeHostImplTest, |
| 4935 ::testing::Values(false, true)); | 4934 ::testing::Values(false, true)); |
| 4936 | 4935 |
| 4937 } // namespace | 4936 } // namespace |
| 4938 } // namespace cc | 4937 } // namespace cc |
| OLD | NEW |