OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef CC_TEST_LAYER_TEST_COMMON_H_ | 5 #ifndef CC_TEST_LAYER_TEST_COMMON_H_ |
6 #define CC_TEST_LAYER_TEST_COMMON_H_ | 6 #define CC_TEST_LAYER_TEST_COMMON_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 150 } |
151 FakeLayerTreeHost* host() { return host_.get(); } | 151 FakeLayerTreeHost* host() { return host_.get(); } |
152 FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); } | 152 FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); } |
153 TaskRunnerProvider* task_runner_provider() const { | 153 TaskRunnerProvider* task_runner_provider() const { |
154 return host_->host_impl()->task_runner_provider(); | 154 return host_->host_impl()->task_runner_provider(); |
155 } | 155 } |
156 const QuadList& quad_list() const { return render_pass_->quad_list; } | 156 const QuadList& quad_list() const { return render_pass_->quad_list; } |
157 scoped_refptr<AnimationTimeline> timeline() { return timeline_; } | 157 scoped_refptr<AnimationTimeline> timeline() { return timeline_; } |
158 scoped_refptr<AnimationTimeline> timeline_impl() { return timeline_impl_; } | 158 scoped_refptr<AnimationTimeline> timeline_impl() { return timeline_impl_; } |
159 | 159 |
| 160 void SetElementIdsForTesting() { |
| 161 host_impl()->active_tree()->SetElementIdsForTesting(); |
| 162 } |
| 163 |
160 private: | 164 private: |
161 FakeLayerTreeHostClient client_; | 165 FakeLayerTreeHostClient client_; |
162 TestTaskGraphRunner task_graph_runner_; | 166 TestTaskGraphRunner task_graph_runner_; |
163 std::unique_ptr<OutputSurface> output_surface_; | 167 std::unique_ptr<OutputSurface> output_surface_; |
164 std::unique_ptr<FakeLayerTreeHost> host_; | 168 std::unique_ptr<FakeLayerTreeHost> host_; |
165 std::unique_ptr<RenderPass> render_pass_; | 169 std::unique_ptr<RenderPass> render_pass_; |
166 scoped_refptr<AnimationTimeline> timeline_; | 170 scoped_refptr<AnimationTimeline> timeline_; |
167 scoped_refptr<AnimationTimeline> timeline_impl_; | 171 scoped_refptr<AnimationTimeline> timeline_impl_; |
168 int layer_impl_id_; | 172 int layer_impl_id_; |
169 }; | 173 }; |
170 }; | 174 }; |
171 | 175 |
172 } // namespace cc | 176 } // namespace cc |
173 | 177 |
174 #endif // CC_TEST_LAYER_TEST_COMMON_H_ | 178 #endif // CC_TEST_LAYER_TEST_COMMON_H_ |
OLD | NEW |