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

Unified Diff: cc/layers/picture_layer_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
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 3d3e0739d8afd19dc4623ef9c83ff665eea0a6b1..8e92cf48da42ecaf748752fc5a9c9294bb44a2d3 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -3617,16 +3617,19 @@ TEST_F(PictureLayerImplTest, UpdateTilesForMasksWithNoVisibleContent) {
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_.pending_tree(), 1);
+ scoped_refptr<FakePicturePileImpl> pending_pile =
+ FakePicturePileImpl::CreateFilledPile(tile_size, bounds);
scoped_ptr<FakePictureLayerImpl> layer_with_mask =
- FakePictureLayerImpl::Create(host_impl_.pending_tree(), 2);
+ FakePictureLayerImpl::CreateWithRasterSource(host_impl_.pending_tree(), 2,
+ pending_pile);
layer_with_mask->SetBounds(bounds);
layer_with_mask->SetContentBounds(bounds);
- scoped_refptr<FakePicturePileImpl> pending_pile =
+ scoped_refptr<FakePicturePileImpl> mask_pile =
FakePicturePileImpl::CreateFilledPile(tile_size, bounds);
scoped_ptr<FakePictureLayerImpl> mask =
FakePictureLayerImpl::CreateMaskWithRasterSource(
- host_impl_.pending_tree(), 3, pending_pile);
+ host_impl_.pending_tree(), 3, mask_pile);
mask->SetBounds(bounds);
mask->SetContentBounds(bounds);
mask->SetDrawsContent(true);
@@ -3636,7 +3639,8 @@ TEST_F(PictureLayerImplTest, UpdateTilesForMasksWithNoVisibleContent) {
static_cast<FakePictureLayerImpl*>(layer_with_mask->mask_layer());
scoped_ptr<FakePictureLayerImpl> child_of_layer_with_mask =
- FakePictureLayerImpl::Create(host_impl_.pending_tree(), 4);
+ FakePictureLayerImpl::CreateWithRasterSource(host_impl_.pending_tree(), 4,
+ pending_pile);
child_of_layer_with_mask->SetBounds(bounds);
child_of_layer_with_mask->SetContentBounds(bounds);
child_of_layer_with_mask->SetDrawsContent(true);

Powered by Google App Engine
This is Rietveld 408576698