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

Unified Diff: cc/trees/layer_tree_host_unittest_picture.cc

Issue 1108773003: Revert of cc: Remove tile sharing from tilings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_picture_layer_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_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_)
« no previous file with comments | « cc/test/fake_picture_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698