OLD | NEW |
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/layers/layer_utils.h" | 5 #include "cc/layers/layer_utils.h" |
6 | 6 |
7 #include "cc/animation/animation_host.h" | 7 #include "cc/animation/animation_host.h" |
8 #include "cc/animation/animation_id_provider.h" | 8 #include "cc/animation/animation_id_provider.h" |
9 #include "cc/animation/transform_operations.h" | 9 #include "cc/animation/transform_operations.h" |
10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 LayerImpl* parent2() { return parent2_; } | 49 LayerImpl* parent2() { return parent2_; } |
50 LayerImpl* child2() { return child2_; } | 50 LayerImpl* child2() { return child2_; } |
51 LayerImpl* grand_child() { return grand_child_; } | 51 LayerImpl* grand_child() { return grand_child_; } |
52 LayerImpl* great_grand_child() { return great_grand_child_; } | 52 LayerImpl* great_grand_child() { return great_grand_child_; } |
53 | 53 |
54 scoped_refptr<AnimationTimeline> timeline() { return timeline_; } | 54 scoped_refptr<AnimationTimeline> timeline() { return timeline_; } |
55 FakeLayerTreeHostImpl& host_impl() { return host_impl_; } | 55 FakeLayerTreeHostImpl& host_impl() { return host_impl_; } |
56 | 56 |
57 private: | 57 private: |
58 static LayerImpl* CreateTwoForkTree(LayerTreeHostImpl* host_impl) { | 58 static LayerImpl* CreateTwoForkTree(LayerTreeHostImpl* host_impl) { |
59 scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl->active_tree(), 1); | 59 std::unique_ptr<LayerImpl> root = |
| 60 LayerImpl::Create(host_impl->active_tree(), 1); |
60 LayerImpl* root_ptr = root.get(); | 61 LayerImpl* root_ptr = root.get(); |
61 root->AddChild(LayerImpl::Create(host_impl->active_tree(), 2)); | 62 root->AddChild(LayerImpl::Create(host_impl->active_tree(), 2)); |
62 root->children()[0]->AddChild( | 63 root->children()[0]->AddChild( |
63 LayerImpl::Create(host_impl->active_tree(), 3)); | 64 LayerImpl::Create(host_impl->active_tree(), 3)); |
64 root->AddChild(LayerImpl::Create(host_impl->active_tree(), 4)); | 65 root->AddChild(LayerImpl::Create(host_impl->active_tree(), 4)); |
65 root->children()[1]->AddChild( | 66 root->children()[1]->AddChild( |
66 LayerImpl::Create(host_impl->active_tree(), 5)); | 67 LayerImpl::Create(host_impl->active_tree(), 5)); |
67 root->children()[1]->children()[0]->AddChild( | 68 root->children()[1]->children()[0]->AddChild( |
68 LayerImpl::Create(host_impl->active_tree(), 6)); | 69 LayerImpl::Create(host_impl->active_tree(), 6)); |
69 root->children()[1]->children()[0]->children()[0]->AddChild( | 70 root->children()[1]->children()[0]->children()[0]->AddChild( |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 // Same as RotateXWithPerspectiveUnderAncestorsWithPositionOr2DTransform test, | 562 // Same as RotateXWithPerspectiveUnderAncestorsWithPositionOr2DTransform test, |
562 // except for the perspective calculations. | 563 // except for the perspective calculations. |
563 | 564 |
564 gfx::BoxF expected(295.f, 180.f, -25.f, 50.f, 50.f, 50.f); | 565 gfx::BoxF expected(295.f, 180.f, -25.f, 50.f, 50.f, 50.f); |
565 EXPECT_BOXF_EQ(expected, box); | 566 EXPECT_BOXF_EQ(expected, box); |
566 } | 567 } |
567 | 568 |
568 } // namespace | 569 } // namespace |
569 | 570 |
570 } // namespace cc | 571 } // namespace cc |
OLD | NEW |