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/run_loop.h" | 5 #include "base/run_loop.h" |
6 #include "base/thread_task_runner_handle.h" | 6 #include "base/thread_task_runner_handle.h" |
7 #include "cc/playback/display_list_raster_source.h" | 7 #include "cc/playback/display_list_raster_source.h" |
8 #include "cc/playback/display_list_recording_source.h" | 8 #include "cc/playback/display_list_recording_source.h" |
9 #include "cc/resources/resource_pool.h" | 9 #include "cc/resources/resource_pool.h" |
10 #include "cc/test/begin_frame_args_test.h" | 10 #include "cc/test/begin_frame_args_test.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 state.soft_memory_limit_in_bytes = 100 * 1000 * 1000; | 57 state.soft_memory_limit_in_bytes = 100 * 1000 * 1000; |
58 state.num_resources_limit = max_tiles_; | 58 state.num_resources_limit = max_tiles_; |
59 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2; | 59 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2; |
60 state.memory_limit_policy = memory_limit_policy_; | 60 state.memory_limit_policy = memory_limit_policy_; |
61 state.tree_priority = tree_priority; | 61 state.tree_priority = tree_priority; |
62 | 62 |
63 global_state_ = state; | 63 global_state_ = state; |
64 host_impl_.resource_pool()->SetResourceUsageLimits( | 64 host_impl_.resource_pool()->SetResourceUsageLimits( |
65 state.soft_memory_limit_in_bytes, | 65 state.soft_memory_limit_in_bytes, |
66 state.soft_memory_limit_in_bytes, | |
67 state.num_resources_limit); | 66 state.num_resources_limit); |
68 host_impl_.tile_manager()->SetGlobalStateForTesting(state); | 67 host_impl_.tile_manager()->SetGlobalStateForTesting(state); |
69 } | 68 } |
70 | 69 |
71 void SetUp() override { | 70 void SetUp() override { |
72 InitializeRenderer(); | 71 InitializeRenderer(); |
73 SetTreePriority(SAME_PRIORITY_FOR_BOTH_TREES); | 72 SetTreePriority(SAME_PRIORITY_FOR_BOTH_TREES); |
74 } | 73 } |
75 | 74 |
76 virtual void InitializeRenderer() { | 75 virtual void InitializeRenderer() { |
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1550 // background is not visible. | 1549 // background is not visible. |
1551 ASSERT_EQ(SK_ColorBLUE, bitmap->getColor(x, y)); | 1550 ASSERT_EQ(SK_ColorBLUE, bitmap->getColor(x, y)); |
1552 } | 1551 } |
1553 } | 1552 } |
1554 } | 1553 } |
1555 } | 1554 } |
1556 } | 1555 } |
1557 | 1556 |
1558 } // namespace | 1557 } // namespace |
1559 } // namespace cc | 1558 } // namespace cc |
OLD | NEW |