OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/test/test_layer_tree_host_base.h" | 5 #include "cc/test/test_layer_tree_host_base.h" |
6 | 6 |
| 7 #include "base/threading/thread_task_runner_handle.h" |
7 #include "cc/test/fake_compositor_frame_sink.h" | 8 #include "cc/test/fake_compositor_frame_sink.h" |
8 #include "cc/test/fake_raster_source.h" | 9 #include "cc/test/fake_raster_source.h" |
9 #include "cc/trees/layer_tree_impl.h" | 10 #include "cc/trees/layer_tree_impl.h" |
10 | 11 |
11 namespace cc { | 12 namespace cc { |
12 | 13 |
13 TestLayerTreeHostBase::TestLayerTreeHostBase() | 14 TestLayerTreeHostBase::TestLayerTreeHostBase() |
14 : task_runner_provider_(base::ThreadTaskRunnerHandle::Get()), | 15 : task_runner_provider_(base::ThreadTaskRunnerHandle::Get()), |
15 pending_layer_(nullptr), | 16 pending_layer_(nullptr), |
16 active_layer_(nullptr), | 17 active_layer_(nullptr), |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2; | 172 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2; |
172 state.memory_limit_policy = ALLOW_ANYTHING; | 173 state.memory_limit_policy = ALLOW_ANYTHING; |
173 state.tree_priority = SAME_PRIORITY_FOR_BOTH_TREES; | 174 state.tree_priority = SAME_PRIORITY_FOR_BOTH_TREES; |
174 | 175 |
175 host_impl_->resource_pool()->SetResourceUsageLimits( | 176 host_impl_->resource_pool()->SetResourceUsageLimits( |
176 state.soft_memory_limit_in_bytes, state.num_resources_limit); | 177 state.soft_memory_limit_in_bytes, state.num_resources_limit); |
177 host_impl_->tile_manager()->SetGlobalStateForTesting(state); | 178 host_impl_->tile_manager()->SetGlobalStateForTesting(state); |
178 } | 179 } |
179 | 180 |
180 } // namespace cc | 181 } // namespace cc |
OLD | NEW |