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