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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 809433003: cc: Make the PictureLayerImpl raster source null until commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullrastersource: . Created 6 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 side-by-side diff with in-line comments
Download patch
« cc/layers/picture_layer_impl.cc ('K') | « cc/resources/picture_pile_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index c8e27a90ab7c6e552464ec40c3e5731bfd8c8297..0b3928772a71e8000ab157f4c1818ff6ad220b30 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -7794,8 +7794,18 @@ TEST_F(LayerTreeHostImplTest, ScrollAnimated) {
TEST_F(LayerTreeHostImplTest, GetPictureLayerImplPairs) {
host_impl_->CreatePendingTree();
- host_impl_->pending_tree()->SetRootLayer(
- PictureLayerImpl::Create(host_impl_->pending_tree(), 10, false));
+
+ scoped_ptr<PictureLayerImpl> layer =
+ PictureLayerImpl::Create(host_impl_->pending_tree(), 10, false);
+ layer->SetBounds(gfx::Size(10, 10));
+
+ scoped_refptr<RasterSource> pile(FakePicturePileImpl::CreateEmptyPile(
+ gfx::Size(10, 10), gfx::Size(10, 10)));
+ Region empty_invalidation;
+ const PictureLayerTilingSet* null_tiling_set = nullptr;
+ layer->UpdateRasterSource(pile, &empty_invalidation, null_tiling_set);
+
+ host_impl_->pending_tree()->SetRootLayer(layer.Pass());
LayerTreeImpl* pending_tree = host_impl_->pending_tree();
LayerImpl* pending_layer = pending_tree->root_layer();
« cc/layers/picture_layer_impl.cc ('K') | « cc/resources/picture_pile_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698