Chromium Code Reviews| Index: cc/trees/layer_tree_host_impl.cc |
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
| index 00ae766155f380cb6f9ec597dd5b8575d7791b36..ee8c9829a47efe159a48b69a71cee85063cca499 100644 |
| --- a/cc/trees/layer_tree_host_impl.cc |
| +++ b/cc/trees/layer_tree_host_impl.cc |
| @@ -1176,6 +1176,18 @@ void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy( |
| gpu::MemoryAllocation::CUTOFF_ALLOW_NOTHING); |
| global_tile_state_.num_resources_limit = policy.num_resources_limit; |
| + if (use_gpu_rasterization_ && |
|
vmiura
2015/04/02 19:12:34
nit: I think this would be easier to understand th
sohanjg
2015/04/08 09:00:31
Done.
|
| + (!visible_ || global_tile_state_.hard_memory_limit_in_bytes == 0)) { |
| + if (rasterizer_) |
| + rasterizer_->SetZeroMemoryLimit(); |
| + } |
| + |
| + if (use_gpu_rasterization_ && |
| + (visible_ && global_tile_state_.hard_memory_limit_in_bytes > 0)) { |
| + if (rasterizer_) |
| + rasterizer_->SetDefaultMemoryLimit(); |
| + } |
| + |
| // TODO(reveman): We should avoid keeping around unused resources if |
| // possible. crbug.com/224475 |
| // Unused limit is calculated from soft-limit, as hard-limit may |