diff options
author | vmpstr <vmpstr@chromium.org> | 2015-05-20 15:37:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-20 22:37:22 +0000 |
commit | 7d351330df503f3b611e70c1de5394c527ebf514 (patch) | |
tree | cc6cb79bb1318508c23a3a74318cc6a783ca7ef0 /cc/trees/layer_tree_host_unittest_picture.cc | |
parent | 5c4a1bf3806b82da1c65f0338c29654ef508f6a3 (diff) | |
download | chromium_src-7d351330df503f3b611e70c1de5394c527ebf514.zip chromium_src-7d351330df503f3b611e70c1de5394c527ebf514.tar.gz chromium_src-7d351330df503f3b611e70c1de5394c527ebf514.tar.bz2 |
cc: Remove recycled twin information from picture layer tiling set.
This patch cleans up some more recycled twin information. In particular,
it removes it from the picture layer tiling set. This makes it possible
to remove one of the functions that gets the recycled twin from the
layer.
R=enne, danakj
Review URL: https://codereview.chromium.org/1149843002
Cr-Commit-Position: refs/heads/master@{#330820}
Diffstat (limited to 'cc/trees/layer_tree_host_unittest_picture.cc')
-rw-r--r-- | cc/trees/layer_tree_host_unittest_picture.cc | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/cc/trees/layer_tree_host_unittest_picture.cc b/cc/trees/layer_tree_host_unittest_picture.cc index 6f222f7..f6c847c 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; |