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

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: try to fix double/float conversion errors 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
« no previous file with comments | « cc/layer_tree_host_common_unittest.cc ('k') | cc/layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « cc/layer_tree_host_common_unittest.cc ('k') | cc/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698