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/memory/ptr_util.h" |
8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
9 #include "cc/test/fake_compositor_frame_sink.h" | 9 #include "cc/test/fake_compositor_frame_sink.h" |
10 #include "cc/test/fake_raster_source.h" | 10 #include "cc/test/fake_raster_source.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 compositor_frame_sink_ = CreateCompositorFrameSink(); | 26 compositor_frame_sink_ = CreateCompositorFrameSink(); |
27 task_graph_runner_ = CreateTaskGraphRunner(); | 27 task_graph_runner_ = CreateTaskGraphRunner(); |
28 host_impl_ = CreateHostImpl(CreateSettings(), &task_runner_provider_, | 28 host_impl_ = CreateHostImpl(CreateSettings(), &task_runner_provider_, |
29 task_graph_runner_.get()); | 29 task_graph_runner_.get()); |
30 InitializeRenderer(); | 30 InitializeRenderer(); |
31 SetInitialTreePriority(); | 31 SetInitialTreePriority(); |
32 } | 32 } |
33 | 33 |
34 LayerTreeSettings TestLayerTreeHostBase::CreateSettings() { | 34 LayerTreeSettings TestLayerTreeHostBase::CreateSettings() { |
35 LayerTreeSettings settings; | 35 LayerTreeSettings settings; |
36 settings.verify_clip_tree_calculations = true; | |
37 return settings; | 36 return settings; |
38 } | 37 } |
39 | 38 |
40 std::unique_ptr<CompositorFrameSink> | 39 std::unique_ptr<CompositorFrameSink> |
41 TestLayerTreeHostBase::CreateCompositorFrameSink() { | 40 TestLayerTreeHostBase::CreateCompositorFrameSink() { |
42 return FakeCompositorFrameSink::Create3d(); | 41 return FakeCompositorFrameSink::Create3d(); |
43 } | 42 } |
44 | 43 |
45 std::unique_ptr<FakeLayerTreeHostImpl> TestLayerTreeHostBase::CreateHostImpl( | 44 std::unique_ptr<FakeLayerTreeHostImpl> TestLayerTreeHostBase::CreateHostImpl( |
46 const LayerTreeSettings& settings, | 45 const LayerTreeSettings& settings, |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 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; |
174 state.memory_limit_policy = ALLOW_ANYTHING; | 173 state.memory_limit_policy = ALLOW_ANYTHING; |
175 state.tree_priority = SAME_PRIORITY_FOR_BOTH_TREES; | 174 state.tree_priority = SAME_PRIORITY_FOR_BOTH_TREES; |
176 | 175 |
177 host_impl_->resource_pool()->SetResourceUsageLimits( | 176 host_impl_->resource_pool()->SetResourceUsageLimits( |
178 state.soft_memory_limit_in_bytes, state.num_resources_limit); | 177 state.soft_memory_limit_in_bytes, state.num_resources_limit); |
179 host_impl_->tile_manager()->SetGlobalStateForTesting(state); | 178 host_impl_->tile_manager()->SetGlobalStateForTesting(state); |
180 } | 179 } |
181 | 180 |
182 } // namespace cc | 181 } // namespace cc |
OLD | NEW |