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 "cc/test/fake_output_surface.h" | 7 #include "cc/test/fake_output_surface.h" |
8 #include "cc/test/fake_raster_source.h" | 8 #include "cc/test/fake_raster_source.h" |
9 #include "cc/trees/layer_tree_impl.h" | 9 #include "cc/trees/layer_tree_impl.h" |
10 | 10 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 pending_layer_ = nullptr; | 153 pending_layer_ = nullptr; |
154 active_layer_ = static_cast<FakePictureLayerImpl*>( | 154 active_layer_ = static_cast<FakePictureLayerImpl*>( |
155 host_impl()->active_tree()->LayerById(id_)); | 155 host_impl()->active_tree()->LayerById(id_)); |
156 | 156 |
157 bool update_lcd_text = false; | 157 bool update_lcd_text = false; |
158 host_impl()->active_tree()->UpdateDrawProperties(update_lcd_text); | 158 host_impl()->active_tree()->UpdateDrawProperties(update_lcd_text); |
159 } | 159 } |
160 | 160 |
161 void TestLayerTreeHostBase::RebuildPropertyTreesOnPendingTree() { | 161 void TestLayerTreeHostBase::RebuildPropertyTreesOnPendingTree() { |
162 host_impl()->pending_tree()->property_trees()->needs_rebuild = true; | 162 host_impl()->pending_tree()->property_trees()->needs_rebuild = true; |
163 host_impl()->pending_tree()->BuildPropertyTreesForTesting(); | 163 host_impl()->pending_tree()->BuildLayerListAndPropertyTreesForTesting(); |
164 } | 164 } |
165 | 165 |
166 void TestLayerTreeHostBase::SetInitialTreePriority() { | 166 void TestLayerTreeHostBase::SetInitialTreePriority() { |
167 GlobalStateThatImpactsTilePriority state; | 167 GlobalStateThatImpactsTilePriority state; |
168 | 168 |
169 state.soft_memory_limit_in_bytes = 100 * 1000 * 1000; | 169 state.soft_memory_limit_in_bytes = 100 * 1000 * 1000; |
170 state.num_resources_limit = 10000; | 170 state.num_resources_limit = 10000; |
171 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2; | 171 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2; |
172 state.memory_limit_policy = ALLOW_ANYTHING; | 172 state.memory_limit_policy = ALLOW_ANYTHING; |
173 state.tree_priority = SAME_PRIORITY_FOR_BOTH_TREES; | 173 state.tree_priority = SAME_PRIORITY_FOR_BOTH_TREES; |
174 | 174 |
175 host_impl_->resource_pool()->SetResourceUsageLimits( | 175 host_impl_->resource_pool()->SetResourceUsageLimits( |
176 state.soft_memory_limit_in_bytes, state.num_resources_limit); | 176 state.soft_memory_limit_in_bytes, state.num_resources_limit); |
177 host_impl_->tile_manager()->SetGlobalStateForTesting(state); | 177 host_impl_->tile_manager()->SetGlobalStateForTesting(state); |
178 } | 178 } |
179 | 179 |
180 } // namespace cc | 180 } // namespace cc |
OLD | NEW |