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

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 compile error 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 <cmath> 9 #include <cmath>
10 10
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 EXPECT_FALSE(m_didRequestCommit); 1045 EXPECT_FALSE(m_didRequestCommit);
1046 } 1046 }
1047 1047
1048 TEST_P(LayerTreeHostImplTest, scrollNonCompositedRoot) 1048 TEST_P(LayerTreeHostImplTest, scrollNonCompositedRoot)
1049 { 1049 {
1050 // Test the configuration where a non-composited root layer is embedded in a 1050 // Test the configuration where a non-composited root layer is embedded in a
1051 // scrollable outer layer. 1051 // scrollable outer layer.
1052 gfx::Size surfaceSize(10, 10); 1052 gfx::Size surfaceSize(10, 10);
1053 1053
1054 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(1); 1054 scoped_ptr<LayerImpl> contentLayer = LayerImpl::create(1);
1055 contentLayer->setUseLCDText(true); 1055 contentLayer->setCanUseLCDText(true);
1056 contentLayer->setDrawsContent(true); 1056 contentLayer->setDrawsContent(true);
1057 contentLayer->setPosition(gfx::PointF(0, 0)); 1057 contentLayer->setPosition(gfx::PointF(0, 0));
1058 contentLayer->setAnchorPoint(gfx::PointF(0, 0)); 1058 contentLayer->setAnchorPoint(gfx::PointF(0, 0));
1059 contentLayer->setBounds(surfaceSize); 1059 contentLayer->setBounds(surfaceSize);
1060 contentLayer->setContentBounds(gfx::Size(surfaceSize.width() * 2, surfaceSiz e.height() * 2)); 1060 contentLayer->setContentBounds(gfx::Size(surfaceSize.width() * 2, surfaceSiz e.height() * 2));
1061 contentLayer->setContentsScale(2, 2); 1061 contentLayer->setContentsScale(2, 2);
1062 1062
1063 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(2); 1063 scoped_ptr<LayerImpl> scrollLayer = LayerImpl::create(2);
1064 scrollLayer->setScrollable(true); 1064 scrollLayer->setScrollable(true);
1065 scrollLayer->setMaxScrollOffset(gfx::Vector2d(surfaceSize.width(), surfaceSi ze.height())); 1065 scrollLayer->setMaxScrollOffset(gfx::Vector2d(surfaceSize.width(), surfaceSi ze.height()));
(...skipping 3351 matching lines...) Expand 10 before | Expand all | Expand 10 after
4417 verifyRenderPassTestData(removeRenderPassesCases[testCaseIndex], testDat a); 4417 verifyRenderPassTestData(removeRenderPassesCases[testCaseIndex], testDat a);
4418 testCaseIndex++; 4418 testCaseIndex++;
4419 } 4419 }
4420 } 4420 }
4421 4421
4422 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, 4422 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests,
4423 LayerTreeHostImplTest, 4423 LayerTreeHostImplTest,
4424 ::testing::Values(false, true)); 4424 ::testing::Values(false, true));
4425 4425
4426 } // anonymous namespace 4426 } // anonymous namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698