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

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

Issue 1544103002: Determine a layer's IsAffectedByPageScale property without using Layer Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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);
267 270
268 pending_layer_ = static_cast<FakePictureLayerImpl*>( 271 pending_layer_ = static_cast<FakePictureLayerImpl*>(
269 host_impl_.pending_tree()->LayerById(id_)); 272 host_impl_.pending_tree()->LayerById(id_));
270 273
271 // Add tilings/tiles for the layer. 274 // Add tilings/tiles for the layer.
272 bool update_lcd_text = false; 275 bool update_lcd_text = false;
273 RebuildPropertyTreesOnPendingTree(); 276 RebuildPropertyTreesOnPendingTree();
274 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); 277 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
275 } 278 }
276 279
(...skipping 4776 matching lines...) Expand 10 before | Expand all | Expand 10 after
5053 // New low res tiling. 5056 // New low res tiling.
5054 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); 5057 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles());
5055 5058
5056 // This tiling will be high res now, it won't contain low res content since it 5059 // This tiling will be high res now, it won't contain low res content since it
5057 // was all destroyed. 5060 // was all destroyed.
5058 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); 5061 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles());
5059 } 5062 }
5060 5063
5061 } // namespace 5064 } // namespace
5062 } // namespace cc 5065 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698