| 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 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 } | 1259 } |
| 1260 | 1260 |
| 1261 TEST_P(LayerTreeHostImplTest, scrollMissesBackfacingChild) | 1261 TEST_P(LayerTreeHostImplTest, scrollMissesBackfacingChild) |
| 1262 { | 1262 { |
| 1263 gfx::Size surfaceSize(10, 10); | 1263 gfx::Size surfaceSize(10, 10); |
| 1264 scoped_ptr<LayerImpl> root = LayerImpl::create(m_hostImpl->activeTree(), 1); | 1264 scoped_ptr<LayerImpl> root = LayerImpl::create(m_hostImpl->activeTree(), 1); |
| 1265 scoped_ptr<LayerImpl> child = createScrollableLayer(2, surfaceSize); | 1265 scoped_ptr<LayerImpl> child = createScrollableLayer(2, surfaceSize); |
| 1266 m_hostImpl->setViewportSize(surfaceSize, surfaceSize); | 1266 m_hostImpl->setViewportSize(surfaceSize, surfaceSize); |
| 1267 | 1267 |
| 1268 gfx::Transform matrix; | 1268 gfx::Transform matrix; |
| 1269 MathUtil::rotateEulerAngles(&matrix, 180, 0, 0); | 1269 matrix.RotateAboutXAxis(180); |
| 1270 child->setTransform(matrix); | 1270 child->setTransform(matrix); |
| 1271 child->setDoubleSided(false); | 1271 child->setDoubleSided(false); |
| 1272 | 1272 |
| 1273 root->addChild(child.Pass()); | 1273 root->addChild(child.Pass()); |
| 1274 m_hostImpl->activeTree()->SetRootLayer(root.Pass()); | 1274 m_hostImpl->activeTree()->SetRootLayer(root.Pass()); |
| 1275 initializeRendererAndDrawFrame(); | 1275 initializeRendererAndDrawFrame(); |
| 1276 | 1276 |
| 1277 // Scroll event is ignored because the scrollable layer is not facing the vi
ewer and there is | 1277 // Scroll event is ignored because the scrollable layer is not facing the vi
ewer and there is |
| 1278 // nothing scrollable behind it. | 1278 // nothing scrollable behind it. |
| 1279 EXPECT_EQ(m_hostImpl->scrollBegin(gfx::Point(5, 5), InputHandlerClient::Whee
l), InputHandlerClient::ScrollIgnored); | 1279 EXPECT_EQ(m_hostImpl->scrollBegin(gfx::Point(5, 5), InputHandlerClient::Whee
l), InputHandlerClient::ScrollIgnored); |
| (...skipping 3132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4412 gfx::Rect noDamage = gfx::Rect(m_hostImpl->deviceViewportSize()); | 4412 gfx::Rect noDamage = gfx::Rect(m_hostImpl->deviceViewportSize()); |
| 4413 drawFrameAndTestDamage(noDamage); | 4413 drawFrameAndTestDamage(noDamage); |
| 4414 } | 4414 } |
| 4415 | 4415 |
| 4416 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, | 4416 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, |
| 4417 LayerTreeHostImplTest, | 4417 LayerTreeHostImplTest, |
| 4418 ::testing::Values(false, true)); | 4418 ::testing::Values(false, true)); |
| 4419 | 4419 |
| 4420 } // namespace | 4420 } // namespace |
| 4421 } // namespace cc | 4421 } // namespace cc |
| OLD | NEW |