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

Side by Side Diff: cc/layer_tree_host_impl_unittest.cc

Issue 11360093: Mark layers that can use LCD text based on layer transform and opacity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed unit tests 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
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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 EXPECT_FALSE(m_didRequestCommit); 1033 EXPECT_FALSE(m_didRequestCommit);
1034 } 1034 }
1035 1035
1036 TEST_P(LayerTreeHostImplTest, scrollNonCompositedRoot) 1036 TEST_P(LayerTreeHostImplTest, scrollNonCompositedRoot)
1037 { 1037 {
1038 // Test the configuration where a non-composited root layer is embedded in a 1038 // Test the configuration where a non-composited root layer is embedded in a
1039 // scrollable outer layer. 1039 // scrollable outer layer.
1040 gfx::Size surfaceSize(10, 10); 1040 gfx::Size surfaceSize(10, 10);
1041 1041
1042 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(1); 1042 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(1);
1043 contentLayer->setUseLCDText(true); 1043 contentLayer->setCanUseLCDText(true);
1044 contentLayer->setDrawsContent(true); 1044 contentLayer->setDrawsContent(true);
1045 contentLayer->setPosition(gfx::PointF(0, 0)); 1045 contentLayer->setPosition(gfx::PointF(0, 0));
1046 contentLayer->setAnchorPoint(gfx::PointF(0, 0)); 1046 contentLayer->setAnchorPoint(gfx::PointF(0, 0));
1047 contentLayer->setBounds(surfaceSize); 1047 contentLayer->setBounds(surfaceSize);
1048 contentLayer->setContentBounds(gfx::Size(surfaceSize.width() * 2, surfaceSiz e.height() * 2)); 1048 contentLayer->setContentBounds(gfx::Size(surfaceSize.width() * 2, surfaceSiz e.height() * 2));
1049 contentLayer->setContentsScale(2, 2); 1049 contentLayer->setContentsScale(2, 2);
1050 1050
1051 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(2); 1051 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(2);
1052 scrollLayer->setScrollable(true); 1052 scrollLayer->setScrollable(true);
1053 scrollLayer->setMaxScrollOffset(gfx::Vector2d(surfaceSize.width(), surfaceSi ze.height())); 1053 scrollLayer->setMaxScrollOffset(gfx::Vector2d(surfaceSize.width(), surfaceSi ze.height()));
(...skipping 3350 matching lines...) Expand 10 before | Expand all | Expand 10 after
4404 verifyRenderPassTestData(removeRenderPassesCases[testCaseIndex], testDat a); 4404 verifyRenderPassTestData(removeRenderPassesCases[testCaseIndex], testDat a);
4405 testCaseIndex++; 4405 testCaseIndex++;
4406 } 4406 }
4407 } 4407 }
4408 4408
4409 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, 4409 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests,
4410 LayerTreeHostImplTest, 4410 LayerTreeHostImplTest,
4411 ::testing::Values(false, true)); 4411 ::testing::Values(false, true));
4412 4412
4413 } // anonymous namespace 4413 } // anonymous namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698