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

Side by Side Diff: cc/resources/tile_manager_unittest.cc

Issue 465853004: Moving RenderSurface creation outside of CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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/resources/eviction_tile_priority_queue.h" 5 #include "cc/resources/eviction_tile_priority_queue.h"
6 #include "cc/resources/raster_tile_priority_queue.h" 6 #include "cc/resources/raster_tile_priority_queue.h"
7 #include "cc/resources/tile.h" 7 #include "cc/resources/tile.h"
8 #include "cc/resources/tile_priority.h" 8 #include "cc/resources/tile_priority.h"
9 #include "cc/test/fake_impl_proxy.h" 9 #include "cc/test/fake_impl_proxy.h"
10 #include "cc/test/fake_layer_tree_host_impl.h" 10 #include "cc/test/fake_layer_tree_host_impl.h"
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 557
558 void SetupPendingTree(scoped_refptr<PicturePileImpl> pile) { 558 void SetupPendingTree(scoped_refptr<PicturePileImpl> pile) {
559 host_impl_.CreatePendingTree(); 559 host_impl_.CreatePendingTree();
560 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); 560 LayerTreeImpl* pending_tree = host_impl_.pending_tree();
561 // Clear recycled tree. 561 // Clear recycled tree.
562 pending_tree->DetachLayerTree(); 562 pending_tree->DetachLayerTree();
563 563
564 scoped_ptr<FakePictureLayerImpl> pending_layer = 564 scoped_ptr<FakePictureLayerImpl> pending_layer =
565 FakePictureLayerImpl::CreateWithPile(pending_tree, id_, pile); 565 FakePictureLayerImpl::CreateWithPile(pending_tree, id_, pile);
566 pending_layer->SetDrawsContent(true); 566 pending_layer->SetDrawsContent(true);
567 pending_layer->SetHasRenderSurface(true);
567 pending_tree->SetRootLayer(pending_layer.PassAs<LayerImpl>()); 568 pending_tree->SetRootLayer(pending_layer.PassAs<LayerImpl>());
568 569
569 pending_layer_ = static_cast<FakePictureLayerImpl*>( 570 pending_layer_ = static_cast<FakePictureLayerImpl*>(
570 host_impl_.pending_tree()->LayerById(id_)); 571 host_impl_.pending_tree()->LayerById(id_));
571 pending_layer_->DoPostCommitInitializationIfNeeded(); 572 pending_layer_->DoPostCommitInitializationIfNeeded();
572 } 573 }
573 574
574 void CreateHighLowResAndSetAllTilesVisible() { 575 void CreateHighLowResAndSetAllTilesVisible() {
575 // Active layer must get updated first so pending layer can share from it. 576 // Active layer must get updated first so pending layer can share from it.
576 active_layer_->CreateDefaultTilingsAndTiles(); 577 active_layer_->CreateDefaultTilingsAndTiles();
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 all_tiles.insert(queue.Top()); 1214 all_tiles.insert(queue.Top());
1214 ++tile_count; 1215 ++tile_count;
1215 queue.Pop(); 1216 queue.Pop();
1216 } 1217 }
1217 EXPECT_EQ(tile_count, all_tiles.size()); 1218 EXPECT_EQ(tile_count, all_tiles.size());
1218 EXPECT_EQ(17u, tile_count); 1219 EXPECT_EQ(17u, tile_count);
1219 } 1220 }
1220 1221
1221 } // namespace 1222 } // namespace
1222 } // namespace cc 1223 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698