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

Unified Diff: cc/trees/layer_tree_impl_unittest.cc

Issue 1801853002: Transfer LayerImpl ownership to LayerTreeImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more asan. Created 4 years, 9 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/trees/layer_tree_impl.cc ('k') | cc/trees/tree_synchronizer.h » ('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 195c44b19a511d6bf068212d98359df9cca7ba96..4a5f48082e874b8dc6d3c95ef447e994d3fe6947 100644
--- a/cc/trees/layer_tree_impl_unittest.cc
+++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -883,9 +883,9 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayers) {
ExecuteCalculateDrawProperties(root.get());
}
- LayerImpl* child1 = root->children()[0].get();
- LayerImpl* child2 = root->children()[1].get();
- LayerImpl* grand_child1 = child1->children()[0].get();
+ LayerImpl* child1 = root->children()[0];
+ LayerImpl* child2 = root->children()[1];
+ LayerImpl* grand_child1 = child1->children()[0];
host_impl().SetViewportSize(root->bounds());
host_impl().active_tree()->SetRootLayer(std::move(root));
@@ -1111,9 +1111,9 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayersAtVaryingDepths) {
root->AddChild(std::move(child2));
}
- LayerImpl* child1 = root->children()[0].get();
- LayerImpl* child2 = root->children()[1].get();
- LayerImpl* grand_child1 = child1->children()[0].get();
+ LayerImpl* child1 = root->children()[0];
+ LayerImpl* child2 = root->children()[1];
+ LayerImpl* grand_child1 = child1->children()[0];
host_impl().SetViewportSize(root->bounds());
host_impl().active_tree()->SetRootLayer(std::move(root));
@@ -1348,9 +1348,9 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayerLists) {
ExecuteCalculateDrawProperties(root.get());
}
- LayerImpl* child1 = root->children()[0].get();
- LayerImpl* child2 = root->children()[1].get();
- LayerImpl* grand_child1 = child1->children()[0].get();
+ LayerImpl* child1 = root->children()[0];
+ LayerImpl* child2 = root->children()[1];
+ LayerImpl* grand_child1 = child1->children()[0];
host_impl().SetViewportSize(root->bounds());
host_impl().active_tree()->SetRootLayer(std::move(root));
@@ -1692,7 +1692,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].get();
+ host_impl().active_tree()->root_layer()->children()[0];
ASSERT_EQ(1u, RenderSurfaceLayerList().size());
ASSERT_EQ(1u, root_layer()->render_surface()->layer_list().size());
@@ -1984,7 +1984,7 @@ TEST_F(LayerTreeImplTest, HitTestingTouchHandlerRegionsForLayerThatIsNotDrawn) {
host_impl().UpdateNumChildrenAndDrawPropertiesForActiveTree();
LayerImpl* test_layer =
- host_impl().active_tree()->root_layer()->children()[0].get();
+ host_impl().active_tree()->root_layer()->children()[0];
// 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());
@@ -2015,7 +2015,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].get();
+ test_layer = host_impl().active_tree()->root_layer()->children()[0];
test_layer->SetPosition(gfx::PointF(10.f, 10.f));
test_layer->NoteLayerPropertyChanged();
expected_screen_space_transform.MakeIdentity();
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/tree_synchronizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698