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

Unified Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 270823003: cc: Move gpu rasterization flag from LayerImpl to LayerTreeImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl_unittest.cc
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index 114c8a9bae3355a225ded8f2b318cbc603033559..f0f0480b28834af92ab4d6fc1aa56dbfed16e75f 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -1672,7 +1672,7 @@ TEST_F(PictureLayerImplTest, NoLowResTilingWithGpuRasterization) {
gfx::Size result_bounds;
SetupDefaultTrees(layer_bounds);
- EXPECT_FALSE(pending_layer_->ShouldUseGpuRasterization());
+ EXPECT_FALSE(pending_layer_->use_gpu_rasterization());
EXPECT_EQ(0u, pending_layer_->tilings()->num_tilings());
pending_layer_->CalculateContentsScale(1.f,
1.f,
@@ -1685,9 +1685,10 @@ TEST_F(PictureLayerImplTest, NoLowResTilingWithGpuRasterization) {
// Should have a low-res and a high-res tiling.
ASSERT_EQ(2u, pending_layer_->tilings()->num_tilings());
- pending_layer_->SetUseGpuRasterization(true);
- EXPECT_TRUE(pending_layer_->ShouldUseGpuRasterization());
- EXPECT_EQ(0u, pending_layer_->tilings()->num_tilings());
+ ResetTilingsAndRasterScales();
+
+ host_impl_.pending_tree()->SetUseGpuRasterization(true);
+ EXPECT_TRUE(pending_layer_->use_gpu_rasterization());
pending_layer_->CalculateContentsScale(1.f,
1.f,
1.f,
@@ -1903,8 +1904,10 @@ TEST_F(PictureLayerImplTest, HighResTilingDuringAnimationForCpuRasterization) {
TEST_F(PictureLayerImplTest, HighResTilingDuringAnimationForGpuRasterization) {
gfx::Size tile_size(host_impl_.settings().default_tile_size);
SetupDefaultTrees(tile_size);
- pending_layer_->SetUseGpuRasterization(true);
- active_layer_->SetUseGpuRasterization(true);
+ host_impl_.pending_tree()->SetUseGpuRasterization(true);
+ host_impl_.active_tree()->SetUseGpuRasterization(true);
+ EXPECT_TRUE(pending_layer_->use_gpu_rasterization());
+ EXPECT_TRUE(active_layer_->use_gpu_rasterization());
float contents_scale = 1.f;
float device_scale = 1.f;
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698