| 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 59bcfd97a457e876fc34bc6507d2d3798e11cd3e..e27a0e6f4ec532810bd4f6612fbaa8bf15600077 100644
|
| --- a/cc/layers/picture_layer_impl_unittest.cc
|
| +++ b/cc/layers/picture_layer_impl_unittest.cc
|
| @@ -489,12 +489,10 @@ TEST_F(PictureLayerImplTest, AddTilesFromNewRecording) {
|
| ++iter) {
|
| EXPECT_FALSE(iter.full_tile_geometry_rect().IsEmpty());
|
| // Ensure there is a recording for this tile.
|
| - gfx::Rect layer_rect = gfx::ScaleToEnclosingRect(
|
| - iter.full_tile_geometry_rect(), 1.f / tiling->contents_scale());
|
| - layer_rect.Intersect(gfx::Rect(layer_bounds));
|
| -
|
| - bool in_pending = pending_pile->recorded_region().Contains(layer_rect);
|
| - bool in_active = active_pile->recorded_region().Contains(layer_rect);
|
| + bool in_pending = pending_pile->CanRaster(tiling->contents_scale(),
|
| + iter.full_tile_geometry_rect());
|
| + bool in_active = active_pile->CanRaster(tiling->contents_scale(),
|
| + iter.full_tile_geometry_rect());
|
|
|
| if (in_pending && !in_active)
|
| EXPECT_EQ(pending_pile, iter->picture_pile());
|
| @@ -634,7 +632,7 @@ TEST_F(PictureLayerImplTest, CreateTilingsEvenIfTwinHasNone) {
|
| gfx::Size layer_bounds(1300, 1900);
|
|
|
| scoped_refptr<FakePicturePileImpl> empty_pile =
|
| - FakePicturePileImpl::CreateFilledPile(tile_size, gfx::Size(1000, 0));
|
| + FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds);
|
| scoped_refptr<FakePicturePileImpl> valid_pile =
|
| FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
|
|
|
| @@ -1321,13 +1319,13 @@ TEST_F(PictureLayerImplTest, NothingRequiredIfActiveMissingTiles) {
|
| gfx::Size tile_size(100, 100);
|
| scoped_refptr<FakePicturePileImpl> pending_pile =
|
| FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
|
| - // An arbitrary bogus outside the layer recording. Enough for the layer to
|
| - // think it can create tiles, but not in bounds so all tiles are null.
|
| - Region active_recorded_region;
|
| - active_recorded_region.Union(gfx::Rect(1000, 1000, 1, 1));
|
| + // This pile will create tilings, but has no recordings so will not create any
|
| + // tiles. This is attempting to simulate scrolling past the end of recorded
|
| + // content on the active layer, where the recordings are so far away that
|
| + // no tiles are created.
|
| scoped_refptr<FakePicturePileImpl> active_pile =
|
| - FakePicturePileImpl::CreatePileWithRecordedRegion(
|
| - tile_size, layer_bounds, active_recorded_region);
|
| + FakePicturePileImpl::CreateEmptyPileThatThinksItHasRecordings(
|
| + tile_size, layer_bounds);
|
| SetupTrees(pending_pile, active_pile);
|
| pending_layer_->set_fixed_tile_size(tile_size);
|
| active_layer_->set_fixed_tile_size(tile_size);
|
| @@ -1340,8 +1338,7 @@ TEST_F(PictureLayerImplTest, NothingRequiredIfActiveMissingTiles) {
|
| EXPECT_EQ(active_layer_->HighResTiling()->AllTilesForTesting().size(), 0u);
|
|
|
| // Since the active layer has no tiles at all, the pending layer doesn't
|
| - // need content in order to activate. This is attempting to simulate
|
| - // scrolling past the end of recorded content on the active layer.
|
| + // need content in order to activate.
|
| pending_layer_->MarkVisibleResourcesAsRequired();
|
| AssertNoTilesRequired(pending_layer_->HighResTiling());
|
| AssertNoTilesRequired(pending_layer_->LowResTiling());
|
|
|