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

Unified Diff: cc/trees/layer_tree_impl_unittest.cc

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/trees/layer_tree_impl.cc ('k') | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl_unittest.cc
diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc
index bffdbaf8669e8ec92d1f0d4c27a85bf26804c9ff..a757d8663ed6e2e8a9d60653887b5136df0be125 100644
--- a/cc/trees/layer_tree_impl_unittest.cc
+++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -755,9 +755,9 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayers) {
root->AddChild(child2.Pass());
}
- LayerImpl* child1 = root->children()[0];
- LayerImpl* child2 = root->children()[1];
- LayerImpl* grand_child1 = child1->children()[0];
+ LayerImpl* child1 = root->children()[0].get();
+ LayerImpl* child2 = root->children()[1].get();
+ LayerImpl* grand_child1 = child1->children()[0].get();
host_impl().SetViewportSize(root->bounds());
host_impl().active_tree()->SetRootLayer(root.Pass());
@@ -983,9 +983,9 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayersAtVaryingDepths) {
root->AddChild(child2.Pass());
}
- LayerImpl* child1 = root->children()[0];
- LayerImpl* child2 = root->children()[1];
- LayerImpl* grand_child1 = child1->children()[0];
+ LayerImpl* child1 = root->children()[0].get();
+ LayerImpl* child2 = root->children()[1].get();
+ LayerImpl* grand_child1 = child1->children()[0].get();
host_impl().SetViewportSize(root->bounds());
host_impl().active_tree()->SetRootLayer(root.Pass());
@@ -1215,9 +1215,9 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayerLists) {
root->AddChild(child2.Pass());
}
- LayerImpl* child1 = root->children()[0];
- LayerImpl* child2 = root->children()[1];
- LayerImpl* grand_child1 = child1->children()[0];
+ LayerImpl* child1 = root->children()[0].get();
+ LayerImpl* child2 = root->children()[1].get();
+ LayerImpl* grand_child1 = child1->children()[0].get();
host_impl().SetViewportSize(root->bounds());
host_impl().active_tree()->SetRootLayer(root.Pass());
@@ -1558,7 +1558,7 @@ TEST_F(LayerTreeImplTest,
// The visible content rect for test_layer is actually 100x100, even though
// its layout size is 50x50, positioned at 25x25.
LayerImpl* test_layer =
- host_impl().active_tree()->root_layer()->children()[0];
+ host_impl().active_tree()->root_layer()->children()[0].get();
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
ASSERT_EQ(1u, root_layer()->render_surface()->layer_list().size());
@@ -1850,7 +1850,7 @@ TEST_F(LayerTreeImplTest, HitTestingTouchHandlerRegionsForLayerThatIsNotDrawn) {
host_impl().UpdateNumChildrenAndDrawPropertiesForActiveTree();
LayerImpl* test_layer =
- host_impl().active_tree()->root_layer()->children()[0];
+ host_impl().active_tree()->root_layer()->children()[0].get();
// As test_layer doesn't draw content, the layer list of root's render surface
// should contain only the root layer.
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
@@ -1881,7 +1881,7 @@ TEST_F(LayerTreeImplTest, HitTestingTouchHandlerRegionsForLayerThatIsNotDrawn) {
// We change the position of the test layer such that the test point is now
// inside the test_layer.
- test_layer = host_impl().active_tree()->root_layer()->children()[0];
+ test_layer = host_impl().active_tree()->root_layer()->children()[0].get();
test_layer->SetPosition(gfx::PointF(10.f, 10.f));
expected_screen_space_transform.MakeIdentity();
expected_screen_space_transform.Translate(10.f, 10.f);
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698