| Index: cc/trees/layer_tree_host_unittest_picture.cc
|
| diff --git a/cc/trees/layer_tree_host_unittest_picture.cc b/cc/trees/layer_tree_host_unittest_picture.cc
|
| index 6f222f71e719e47a6b44c3675b6e545cface7c8b..7d3d5254f4f0d7a25331d78462ae8562a32bd499 100644
|
| --- a/cc/trees/layer_tree_host_unittest_picture.cc
|
| +++ b/cc/trees/layer_tree_host_unittest_picture.cc
|
| @@ -242,8 +242,8 @@
|
| EXPECT_TRUE(tiling->TileAt(0, 0));
|
| EXPECT_FALSE(tiling->TileAt(0, num_tiles_y));
|
|
|
| - // The recycled tiling has no tiles.
|
| - EXPECT_FALSE(recycled_tiling->TileAt(0, 0));
|
| + // The recycled tiling matches it.
|
| + EXPECT_TRUE(recycled_tiling->TileAt(0, 0));
|
| EXPECT_FALSE(recycled_tiling->TileAt(0, num_tiles_y));
|
|
|
| // The live tiles rect matches on the recycled tree.
|
| @@ -265,6 +265,10 @@
|
| // The recycled twin tiling should not have unshared tiles at the top
|
| // either.
|
| EXPECT_FALSE(recycled_tiling->TileAt(0, 0));
|
| +
|
| + // The live tiles rect matches on the recycled tree.
|
| + EXPECT_EQ(tiling->live_tiles_rect(),
|
| + recycled_tiling->live_tiles_rect());
|
|
|
| // Make the top of the layer visible again.
|
| picture_impl->SetPosition(gfx::PointF());
|
| @@ -280,8 +284,8 @@
|
| EXPECT_TRUE(tiling->TileAt(0, 0));
|
| EXPECT_FALSE(tiling->TileAt(0, num_tiles_y));
|
|
|
| - // The recycled tiling should have no tiles.
|
| - EXPECT_FALSE(recycled_tiling->TileAt(0, 0));
|
| + // The recycled tiling should also have tiles at the top.
|
| + EXPECT_TRUE(recycled_tiling->TileAt(0, 0));
|
| EXPECT_FALSE(recycled_tiling->TileAt(0, num_tiles_y));
|
|
|
| // The live tiles rect matches on the recycled tree.
|
| @@ -304,15 +308,9 @@
|
| PictureLayerTiling* tiling = picture_impl->HighResTiling();
|
| int num_tiles_y = tiling->TilingDataForTesting().num_tiles_y();
|
|
|
| - if (!impl->active_tree()->root_layer()) {
|
| - // If active tree doesn't have the layer, then pending tree should have
|
| - // all needed tiles.
|
| - EXPECT_TRUE(tiling->TileAt(0, 0));
|
| - } else {
|
| - // Since there was no invalidation, the pending tree shouldn't have any
|
| - // tiles.
|
| - EXPECT_FALSE(tiling->TileAt(0, 0));
|
| - }
|
| + // The pending layer should always have tiles at the top of it each commit.
|
| + // The tile is part of the required for activation set so it should exist.
|
| + EXPECT_TRUE(tiling->TileAt(0, 0));
|
| EXPECT_FALSE(tiling->TileAt(0, num_tiles_y));
|
|
|
| if (did_post_commit_)
|
|
|