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

Side by Side Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 1565783002: Revert of Determine a layer's IsAffectedByPageScale property without using Layer Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « cc/layers/picture_image_layer_impl_unittest.cc ('k') | cc/trees/property_tree_builder.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 if (!tile_size.IsEmpty()) 257 if (!tile_size.IsEmpty())
258 pending_layer->set_fixed_tile_size(tile_size); 258 pending_layer->set_fixed_tile_size(tile_size);
259 } 259 }
260 pending_root->SetForceRenderSurface(true); 260 pending_root->SetForceRenderSurface(true);
261 // The bounds() just mirror the raster source size. 261 // The bounds() just mirror the raster source size.
262 pending_layer->SetBounds(raster_source->GetSize()); 262 pending_layer->SetBounds(raster_source->GetSize());
263 pending_layer->SetRasterSourceOnPending(raster_source, invalidation); 263 pending_layer->SetRasterSourceOnPending(raster_source, invalidation);
264 264
265 pending_root->AddChild(std::move(pending_layer)); 265 pending_root->AddChild(std::move(pending_layer));
266 pending_tree->SetRootLayer(std::move(pending_root)); 266 pending_tree->SetRootLayer(std::move(pending_root));
267 pending_tree->SetViewportLayersFromIds(
268 Layer::INVALID_ID, pending_tree->root_layer()->id(), Layer::INVALID_ID,
269 Layer::INVALID_ID);
270 267
271 pending_layer_ = static_cast<FakePictureLayerImpl*>( 268 pending_layer_ = static_cast<FakePictureLayerImpl*>(
272 host_impl_.pending_tree()->LayerById(id_)); 269 host_impl_.pending_tree()->LayerById(id_));
273 270
274 // Add tilings/tiles for the layer. 271 // Add tilings/tiles for the layer.
275 bool update_lcd_text = false; 272 bool update_lcd_text = false;
276 RebuildPropertyTreesOnPendingTree(); 273 RebuildPropertyTreesOnPendingTree();
277 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); 274 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
278 } 275 }
279 276
(...skipping 4776 matching lines...) Expand 10 before | Expand all | Expand 10 after
5056 // New low res tiling. 5053 // New low res tiling.
5057 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); 5054 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles());
5058 5055
5059 // This tiling will be high res now, it won't contain low res content since it 5056 // This tiling will be high res now, it won't contain low res content since it
5060 // was all destroyed. 5057 // was all destroyed.
5061 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); 5058 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles());
5062 } 5059 }
5063 5060
5064 } // namespace 5061 } // namespace
5065 } // namespace cc 5062 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_image_layer_impl_unittest.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698