| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/location.h" | 5 #include "base/location.h" |
| 6 #include "base/thread_task_runner_handle.h" | 6 #include "base/thread_task_runner_handle.h" |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "cc/debug/lap_timer.h" | 8 #include "cc/debug/lap_timer.h" |
| 9 #include "cc/raster/raster_buffer.h" | 9 #include "cc/raster/raster_buffer.h" |
| 10 #include "cc/test/begin_frame_args_test.h" | 10 #include "cc/test/begin_frame_args_test.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 gfx::Size tile_size(256, 256); | 104 gfx::Size tile_size(256, 256); |
| 105 | 105 |
| 106 state.soft_memory_limit_in_bytes = 100 * 1000 * 1000; | 106 state.soft_memory_limit_in_bytes = 100 * 1000 * 1000; |
| 107 state.num_resources_limit = max_tiles_; | 107 state.num_resources_limit = max_tiles_; |
| 108 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2; | 108 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2; |
| 109 state.memory_limit_policy = memory_limit_policy_; | 109 state.memory_limit_policy = memory_limit_policy_; |
| 110 state.tree_priority = tree_priority; | 110 state.tree_priority = tree_priority; |
| 111 | 111 |
| 112 global_state_ = state; | 112 global_state_ = state; |
| 113 host_impl_.resource_pool()->SetResourceUsageLimits( | 113 host_impl_.resource_pool()->SetResourceUsageLimits( |
| 114 state.soft_memory_limit_in_bytes, 0, state.num_resources_limit); | 114 state.soft_memory_limit_in_bytes, state.num_resources_limit); |
| 115 host_impl_.tile_manager()->SetGlobalStateForTesting(state); | 115 host_impl_.tile_manager()->SetGlobalStateForTesting(state); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void SetUp() override { | 118 void SetUp() override { |
| 119 InitializeRenderer(); | 119 InitializeRenderer(); |
| 120 SetTreePriority(SAME_PRIORITY_FOR_BOTH_TREES); | 120 SetTreePriority(SAME_PRIORITY_FOR_BOTH_TREES); |
| 121 } | 121 } |
| 122 | 122 |
| 123 virtual void InitializeRenderer() { | 123 virtual void InitializeRenderer() { |
| 124 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d().Pass()); | 124 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d().Pass()); |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); | 474 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); |
| 475 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 475 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
| 476 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 476 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
| 477 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 477 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
| 478 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 478 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
| 479 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 479 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
| 480 } | 480 } |
| 481 | 481 |
| 482 } // namespace | 482 } // namespace |
| 483 } // namespace cc | 483 } // namespace cc |
| OLD | NEW |