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

Side by Side Diff: cc/trees/layer_tree_impl_unittest.cc

Issue 2745963002: Replace unique_ptr.reset(other_unique_ptr.release()) with std::move() in cc/trees/ (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "cc/layers/heads_up_display_layer_impl.h" 9 #include "cc/layers/heads_up_display_layer_impl.h"
10 #include "cc/test/fake_layer_tree_host_impl.h" 10 #include "cc/test/fake_layer_tree_host_impl.h"
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 grand_child->SetPosition(gfx::PointF(0.f, 40.f)); 1066 grand_child->SetPosition(gfx::PointF(0.f, 40.f));
1067 grand_child->SetBounds(gfx::Size(100, 50)); 1067 grand_child->SetBounds(gfx::Size(100, 50));
1068 grand_child->SetDrawsContent(true); 1068 grand_child->SetDrawsContent(true);
1069 grand_child->test_properties()->force_render_surface = true; 1069 grand_child->test_properties()->force_render_surface = true;
1070 1070
1071 // This should let |grand_child| "escape" |child|'s clip. 1071 // This should let |grand_child| "escape" |child|'s clip.
1072 grand_child->test_properties()->clip_parent = root; 1072 grand_child->test_properties()->clip_parent = root;
1073 std::unique_ptr<std::set<LayerImpl*>> clip_children( 1073 std::unique_ptr<std::set<LayerImpl*>> clip_children(
1074 new std::set<LayerImpl*>); 1074 new std::set<LayerImpl*>);
1075 clip_children->insert(grand_child.get()); 1075 clip_children->insert(grand_child.get());
1076 root->test_properties()->clip_children.reset(clip_children.release()); 1076 root->test_properties()->clip_children = std::move(clip_children);
1077 1077
1078 child->test_properties()->AddChild(std::move(grand_child)); 1078 child->test_properties()->AddChild(std::move(grand_child));
1079 root->test_properties()->AddChild(std::move(child)); 1079 root->test_properties()->AddChild(std::move(child));
1080 } 1080 }
1081 1081
1082 host_impl().SetViewportSize(root->bounds()); 1082 host_impl().SetViewportSize(root->bounds());
1083 host_impl().UpdateNumChildrenAndDrawPropertiesForActiveTree(); 1083 host_impl().UpdateNumChildrenAndDrawPropertiesForActiveTree();
1084 1084
1085 gfx::PointF test_point(12.f, 52.f); 1085 gfx::PointF test_point(12.f, 52.f);
1086 LayerImpl* result_layer = 1086 LayerImpl* result_layer =
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 auto weak_promise = promise->AsWeakPtr(); 2401 auto weak_promise = promise->AsWeakPtr();
2402 host_impl().active_tree()->QueueSwapPromise(std::move(promise)); 2402 host_impl().active_tree()->QueueSwapPromise(std::move(promise));
2403 host_impl().active_tree()->BreakSwapPromises( 2403 host_impl().active_tree()->BreakSwapPromises(
2404 SwapPromise::DidNotSwapReason::SWAP_FAILS); 2404 SwapPromise::DidNotSwapReason::SWAP_FAILS);
2405 EXPECT_FALSE(weak_promise); 2405 EXPECT_FALSE(weak_promise);
2406 } 2406 }
2407 } 2407 }
2408 2408
2409 } // namespace 2409 } // namespace
2410 } // namespace cc 2410 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698