OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_position_constraint.h" | 5 #include "cc/layers/layer_position_constraint.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 layer_tree_host_( | 64 layer_tree_host_( |
65 FakeLayerTreeHost::Create(&fake_client_, &task_graph_runner_)), | 65 FakeLayerTreeHost::Create(&fake_client_, &task_graph_runner_)), |
66 root_impl_(nullptr), | 66 root_impl_(nullptr), |
67 inner_viewport_container_layer_impl_(nullptr), | 67 inner_viewport_container_layer_impl_(nullptr), |
68 scroll_layer_impl_(nullptr), | 68 scroll_layer_impl_(nullptr), |
69 outer_viewport_container_layer_impl_(nullptr), | 69 outer_viewport_container_layer_impl_(nullptr), |
70 child_transform_layer_impl_(nullptr), | 70 child_transform_layer_impl_(nullptr), |
71 child_impl_(nullptr), | 71 child_impl_(nullptr), |
72 grand_child_impl_(nullptr), | 72 grand_child_impl_(nullptr), |
73 great_grand_child_impl_(nullptr) { | 73 great_grand_child_impl_(nullptr) { |
74 layer_tree_host_->InitializeForTesting(scoped_ptr<Proxy>(new FakeProxy)); | 74 layer_tree_host_->InitializeForTesting( |
| 75 TaskRunnerProvider::Create(nullptr, nullptr), |
| 76 scoped_ptr<Proxy>(new FakeProxy)); |
75 CreateTreeForTest(); | 77 CreateTreeForTest(); |
76 fixed_to_top_left_.set_is_fixed_position(true); | 78 fixed_to_top_left_.set_is_fixed_position(true); |
77 fixed_to_bottom_right_.set_is_fixed_position(true); | 79 fixed_to_bottom_right_.set_is_fixed_position(true); |
78 fixed_to_bottom_right_.set_is_fixed_to_right_edge(true); | 80 fixed_to_bottom_right_.set_is_fixed_to_right_edge(true); |
79 fixed_to_bottom_right_.set_is_fixed_to_bottom_edge(true); | 81 fixed_to_bottom_right_.set_is_fixed_to_bottom_edge(true); |
80 } | 82 } |
81 | 83 |
82 void CreateTreeForTest() { | 84 void CreateTreeForTest() { |
83 // scroll_layer_ is the inner viewport scroll layer and child_ is the outer | 85 // scroll_layer_ is the inner viewport scroll layer and child_ is the outer |
84 // viewport scroll layer. | 86 // viewport scroll layer. |
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 expected_fixed_child_transform.Translate(20.0, 20.0); | 1121 expected_fixed_child_transform.Translate(20.0, 20.0); |
1120 | 1122 |
1121 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_scroll_layer_transform, | 1123 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_scroll_layer_transform, |
1122 scroll_layer_impl_->draw_transform()); | 1124 scroll_layer_impl_->draw_transform()); |
1123 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_child_transform, | 1125 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_child_transform, |
1124 fixed_child_impl->draw_transform()); | 1126 fixed_child_impl->draw_transform()); |
1125 } | 1127 } |
1126 | 1128 |
1127 } // namespace | 1129 } // namespace |
1128 } // namespace cc | 1130 } // namespace cc |
OLD | NEW |