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