Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: cc/layer_tree_host_impl_unittest.cc

Issue 11774005: Migrate more functions from MathUtil to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Converted constructors to row-major input Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698