OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |