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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 334953003: cc: Early out sooner in UpdateTilePriorities when !CanHaveTilings(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: canhavetilings: fixcctests Created 6 years, 6 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.h ('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_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 6c747774f6344916342a2bf33c8e09bc92ab096d..f415c51afe2157e86600f3b34c78b2d5e760bd5d 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -6573,61 +6573,5 @@ TEST_F(LayerTreeHostImplWithImplicitLimitsTest, ImplicitMemoryLimits) {
150u * 1024u * 1024u);
}
-TEST_F(LayerTreeHostImplTest, UpdateTilesForMasksWithNoVisibleContent) {
- gfx::Size bounds(100000, 100);
-
- host_impl_->CreatePendingTree();
-
- scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->pending_tree(), 1);
-
- scoped_ptr<FakePictureLayerImpl> layer_with_mask =
- FakePictureLayerImpl::Create(host_impl_->pending_tree(), 2);
-
- layer_with_mask->SetBounds(bounds);
- layer_with_mask->SetContentBounds(bounds);
-
- scoped_ptr<FakePictureLayerImpl> mask =
- FakePictureLayerImpl::Create(host_impl_->pending_tree(), 3);
-
- mask->SetIsMask(true);
- mask->SetBounds(bounds);
- mask->SetContentBounds(bounds);
-
- FakePictureLayerImpl* pending_mask_content = mask.get();
- layer_with_mask->SetMaskLayer(mask.PassAs<LayerImpl>());
-
- scoped_ptr<FakePictureLayerImpl> child_of_layer_with_mask =
- FakePictureLayerImpl::Create(host_impl_->pending_tree(), 4);
-
- child_of_layer_with_mask->SetBounds(bounds);
- child_of_layer_with_mask->SetContentBounds(bounds);
- child_of_layer_with_mask->SetDrawsContent(true);
-
- layer_with_mask->AddChild(child_of_layer_with_mask.PassAs<LayerImpl>());
-
- root->AddChild(layer_with_mask.PassAs<LayerImpl>());
-
- host_impl_->pending_tree()->SetRootLayer(root.Pass());
-
- gfx::Rect r1 = pending_mask_content->visible_rect_for_tile_priority();
- ASSERT_EQ(0, r1.x());
- ASSERT_EQ(0, r1.y());
- ASSERT_EQ(0, r1.width());
- ASSERT_EQ(0, r1.height());
-
- host_impl_->ActivatePendingTree();
-
- host_impl_->active_tree()->UpdateDrawProperties();
-
- ASSERT_EQ(2u, host_impl_->active_tree()->RenderSurfaceLayerList().size());
-
- FakePictureLayerImpl* active_mask_content =
- static_cast<FakePictureLayerImpl*>(
- host_impl_->active_tree()->root_layer()->children()[0]->mask_layer());
- gfx::Rect r2 = active_mask_content->visible_rect_for_tile_priority();
-
- ASSERT_TRUE(!r2.IsEmpty());
-}
-
} // namespace
} // namespace cc
« no previous file with comments | « cc/test/fake_picture_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698