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

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

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 2 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/tree_synchronizer.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/tree_synchronizer.h" 5 #include "cc/trees/tree_synchronizer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 class MockLayer : public Layer { 50 class MockLayer : public Layer {
51 public: 51 public:
52 static scoped_refptr<MockLayer> Create( 52 static scoped_refptr<MockLayer> Create(
53 std::vector<int>* layer_impl_destruction_list) { 53 std::vector<int>* layer_impl_destruction_list) {
54 return make_scoped_refptr(new MockLayer(layer_impl_destruction_list)); 54 return make_scoped_refptr(new MockLayer(layer_impl_destruction_list));
55 } 55 }
56 56
57 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) 57 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
58 OVERRIDE { 58 OVERRIDE {
59 return MockLayerImpl::Create(tree_impl, layer_id_).PassAs<LayerImpl>(); 59 return MockLayerImpl::Create(tree_impl, layer_id_);
60 } 60 }
61 61
62 virtual void PushPropertiesTo(LayerImpl* layer_impl) OVERRIDE { 62 virtual void PushPropertiesTo(LayerImpl* layer_impl) OVERRIDE {
63 Layer::PushPropertiesTo(layer_impl); 63 Layer::PushPropertiesTo(layer_impl);
64 64
65 MockLayerImpl* mock_layer_impl = static_cast<MockLayerImpl*>(layer_impl); 65 MockLayerImpl* mock_layer_impl = static_cast<MockLayerImpl*>(layer_impl);
66 mock_layer_impl->SetLayerImplDestructionList(layer_impl_destruction_list_); 66 mock_layer_impl->SetLayerImplDestructionList(layer_impl_destruction_list_);
67 } 67 }
68 68
69 private: 69 private:
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 host_impl->active_tree()); 751 host_impl->active_tree());
752 752
753 // The clip children should have been unhooked. 753 // The clip children should have been unhooked.
754 EXPECT_EQ(2u, intervening->children().size()); 754 EXPECT_EQ(2u, intervening->children().size());
755 EXPECT_FALSE(clip_child2->clip_parent()); 755 EXPECT_FALSE(clip_child2->clip_parent());
756 EXPECT_FALSE(additional_clip_child->clip_parent()); 756 EXPECT_FALSE(additional_clip_child->clip_parent());
757 } 757 }
758 758
759 } // namespace 759 } // namespace
760 } // namespace cc 760 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/tree_synchronizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698