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

Side by Side Diff: cc/layer_tree_host_impl_unittest.cc

Issue 11276060: Pass accurate contentsScale to LayerImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 1 month 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_impl.cc ('k') | cc/layer_tree_host_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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/layer_tree_host_impl.h" 7 #include "cc/layer_tree_host_impl.h"
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 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 // scrollable outer layer. 1038 // scrollable outer layer.
1039 IntSize surfaceSize(10, 10); 1039 IntSize surfaceSize(10, 10);
1040 1040
1041 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(1); 1041 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(1);
1042 contentLayer->setUseLCDText(true); 1042 contentLayer->setUseLCDText(true);
1043 contentLayer->setDrawsContent(true); 1043 contentLayer->setDrawsContent(true);
1044 contentLayer->setPosition(FloatPoint(0, 0)); 1044 contentLayer->setPosition(FloatPoint(0, 0));
1045 contentLayer->setAnchorPoint(FloatPoint(0, 0)); 1045 contentLayer->setAnchorPoint(FloatPoint(0, 0));
1046 contentLayer->setBounds(surfaceSize); 1046 contentLayer->setBounds(surfaceSize);
1047 contentLayer->setContentBounds(IntSize(surfaceSize.width() * 2, surfaceSize. height() * 2)); 1047 contentLayer->setContentBounds(IntSize(surfaceSize.width() * 2, surfaceSize. height() * 2));
1048 contentLayer->setContentsScale(2, 2);
1048 1049
1049 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(2); 1050 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(2);
1050 scrollLayer->setScrollable(true); 1051 scrollLayer->setScrollable(true);
1051 scrollLayer->setMaxScrollPosition(surfaceSize); 1052 scrollLayer->setMaxScrollPosition(surfaceSize);
1052 scrollLayer->setBounds(surfaceSize); 1053 scrollLayer->setBounds(surfaceSize);
1053 scrollLayer->setContentBounds(surfaceSize); 1054 scrollLayer->setContentBounds(surfaceSize);
1054 scrollLayer->setPosition(FloatPoint(0, 0)); 1055 scrollLayer->setPosition(FloatPoint(0, 0));
1055 scrollLayer->setAnchorPoint(FloatPoint(0, 0)); 1056 scrollLayer->setAnchorPoint(FloatPoint(0, 0));
1056 scrollLayer->addChild(contentLayer.Pass()); 1057 scrollLayer->addChild(contentLayer.Pass());
1057 1058
(...skipping 3347 matching lines...) Expand 10 before | Expand all | Expand 10 after
4405 verifyRenderPassTestData(removeRenderPassesCases[testCaseIndex], testDat a); 4406 verifyRenderPassTestData(removeRenderPassesCases[testCaseIndex], testDat a);
4406 testCaseIndex++; 4407 testCaseIndex++;
4407 } 4408 }
4408 } 4409 }
4409 4410
4410 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, 4411 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests,
4411 LayerTreeHostImplTest, 4412 LayerTreeHostImplTest,
4412 ::testing::Values(false, true)); 4413 ::testing::Values(false, true));
4413 4414
4414 } // namespace 4415 } // namespace
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | cc/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698