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

Unified Diff: cc/trees/layer_tree_host_unittest_picture.cc

Issue 1149843002: cc: Remove recycled twin information from picture layer tiling set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/tiles/picture_layer_tiling_set.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..f6c847cec00f55f5f8cb1b72d8223619e6545c1f 100644
--- a/cc/trees/layer_tree_host_unittest_picture.cc
+++ b/cc/trees/layer_tree_host_unittest_picture.cc
@@ -107,24 +107,16 @@ class LayerTreeHostPictureTestTwinLayer
active_picture_impl->GetPendingOrActiveTwinLayer());
EXPECT_EQ(active_picture_impl,
pending_picture_impl->GetPendingOrActiveTwinLayer());
- EXPECT_EQ(nullptr, active_picture_impl->GetRecycledTwinLayer());
}
void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* active_root_impl = impl->active_tree()->root_layer();
- LayerImpl* recycle_root_impl = impl->recycle_tree()->root_layer();
-
if (active_root_impl->children().empty()) {
EXPECT_EQ(2, activates_);
} else {
FakePictureLayerImpl* active_picture_impl =
static_cast<FakePictureLayerImpl*>(active_root_impl->children()[0]);
- FakePictureLayerImpl* recycle_picture_impl =
- static_cast<FakePictureLayerImpl*>(recycle_root_impl->children()[0]);
-
EXPECT_EQ(nullptr, active_picture_impl->GetPendingOrActiveTwinLayer());
- EXPECT_EQ(recycle_picture_impl,
- active_picture_impl->GetRecycledTwinLayer());
}
++activates_;
@@ -228,13 +220,9 @@ class LayerTreeHostPictureTestChangeLiveTilesRectWithRecycleTree
LayerImpl* child = impl->active_tree()->root_layer()->children()[0];
FakePictureLayerImpl* picture_impl =
static_cast<FakePictureLayerImpl*>(child);
- FakePictureLayerImpl* recycled_impl = static_cast<FakePictureLayerImpl*>(
- picture_impl->GetRecycledTwinLayer());
-
switch (++frame_) {
case 1: {
PictureLayerTiling* tiling = picture_impl->HighResTiling();
- PictureLayerTiling* recycled_tiling = recycled_impl->HighResTiling();
int num_tiles_y = tiling->TilingDataForTesting().num_tiles_y();
// There should be tiles at the top of the picture layer but not at the
@@ -242,14 +230,6 @@ class LayerTreeHostPictureTestChangeLiveTilesRectWithRecycleTree
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));
- EXPECT_FALSE(recycled_tiling->TileAt(0, num_tiles_y));
-
- // The live tiles rect matches on the recycled tree.
- EXPECT_EQ(tiling->live_tiles_rect(),
- recycled_tiling->live_tiles_rect());
-
// Make the bottom of the layer visible.
picture_impl->SetPosition(gfx::PointF(0.f, -100000.f + 100.f));
impl->SetNeedsRedraw();
@@ -257,15 +237,10 @@ class LayerTreeHostPictureTestChangeLiveTilesRectWithRecycleTree
}
case 2: {
PictureLayerTiling* tiling = picture_impl->HighResTiling();
- PictureLayerTiling* recycled_tiling = recycled_impl->HighResTiling();
// There not be tiles at the top of the layer now.
EXPECT_FALSE(tiling->TileAt(0, 0));
- // The recycled twin tiling should not have unshared tiles at the top
- // either.
- EXPECT_FALSE(recycled_tiling->TileAt(0, 0));
-
// Make the top of the layer visible again.
picture_impl->SetPosition(gfx::PointF());
impl->SetNeedsRedraw();
@@ -273,21 +248,12 @@ class LayerTreeHostPictureTestChangeLiveTilesRectWithRecycleTree
}
case 3: {
PictureLayerTiling* tiling = picture_impl->HighResTiling();
- PictureLayerTiling* recycled_tiling = recycled_impl->HighResTiling();
int num_tiles_y = tiling->TilingDataForTesting().num_tiles_y();
// There should be tiles at the top of the picture layer again.
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));
- EXPECT_FALSE(recycled_tiling->TileAt(0, num_tiles_y));
-
- // The live tiles rect matches on the recycled tree.
- EXPECT_EQ(tiling->live_tiles_rect(),
- recycled_tiling->live_tiles_rect());
-
// Make a new main frame without changing the picture layer at all, so
// it won't need to update or push properties.
did_post_commit_ = true;
« no previous file with comments | « cc/tiles/picture_layer_tiling_set.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698