| 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 | |
| 164 private: | 160 private: |
| 165 FakeLayerTreeHostClient client_; | 161 FakeLayerTreeHostClient client_; |
| 166 TestTaskGraphRunner task_graph_runner_; | 162 TestTaskGraphRunner task_graph_runner_; |
| 167 std::unique_ptr<OutputSurface> output_surface_; | 163 std::unique_ptr<OutputSurface> output_surface_; |
| 168 std::unique_ptr<FakeLayerTreeHost> host_; | 164 std::unique_ptr<FakeLayerTreeHost> host_; |
| 169 std::unique_ptr<RenderPass> render_pass_; | 165 std::unique_ptr<RenderPass> render_pass_; |
| 170 scoped_refptr<AnimationTimeline> timeline_; | 166 scoped_refptr<AnimationTimeline> timeline_; |
| 171 scoped_refptr<AnimationTimeline> timeline_impl_; | 167 scoped_refptr<AnimationTimeline> timeline_impl_; |
| 172 int layer_impl_id_; | 168 int layer_impl_id_; |
| 173 }; | 169 }; |
| 174 }; | 170 }; |
| 175 | 171 |
| 176 } // namespace cc | 172 } // namespace cc |
| 177 | 173 |
| 178 #endif // CC_TEST_LAYER_TEST_COMMON_H_ | 174 #endif // CC_TEST_LAYER_TEST_COMMON_H_ |
| OLD | NEW |