| 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 5e89bbeda7ebed65b7fb2dde7c04b8d84c2f968a..c742fe9ee50b4f02e1727963ea016a12eb0108a3 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -162,7 +162,7 @@ unsigned GetMapImageTextureTarget(
|
|
|
| size_t GetMaxStagingResourceCount() {
|
| // Upper bound for number of staging resource to allow.
|
| - return 32;
|
| + return 32 * 512 * 512 * 4;
|
| }
|
|
|
| } // namespace
|
| @@ -284,8 +284,7 @@ LayerTreeHostImpl::LayerTreeHostImpl(
|
| visible_(true),
|
| cached_managed_memory_policy_(
|
| PrioritizedResourceManager::DefaultMemoryAllocationLimit(),
|
| - gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING,
|
| - ManagedMemoryPolicy::kDefaultNumResourcesLimit),
|
| + gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING),
|
| pinch_gesture_active_(false),
|
| pinch_gesture_end_should_clear_scrolling_layer_(false),
|
| fps_counter_(FrameRateCounter::Create(proxy_->HasImplThread())),
|
| @@ -1229,7 +1228,6 @@ void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy(
|
| visible_ ?
|
| policy.priority_cutoff_when_visible :
|
| gpu::MemoryAllocation::CUTOFF_ALLOW_NOTHING);
|
| - global_tile_state_.num_resources_limit = policy.num_resources_limit;
|
|
|
| // TODO(reveman): We should avoid keeping around unused resources if
|
| // possible. crbug.com/224475
|
| @@ -1246,16 +1244,14 @@ void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy(
|
| // limit after going over.
|
| resource_pool_->SetResourceUsageLimits(
|
| global_tile_state_.soft_memory_limit_in_bytes,
|
| - unused_memory_limit_in_bytes,
|
| - global_tile_state_.num_resources_limit);
|
| + unused_memory_limit_in_bytes);
|
|
|
| // Release all staging resources when invisible.
|
| if (staging_resource_pool_) {
|
| staging_resource_pool_->CheckBusyResources();
|
| - staging_resource_pool_->SetResourceUsageLimits(
|
| - std::numeric_limits<size_t>::max(),
|
| - std::numeric_limits<size_t>::max(),
|
| - visible_ ? GetMaxStagingResourceCount() : 0);
|
| + size_t staging_bytes_limit = visible_ ? GetMaxStagingResourceCount() : 0u;
|
| + staging_resource_pool_->SetResourceUsageLimits(staging_bytes_limit,
|
| + staging_bytes_limit);
|
| }
|
|
|
| DidModifyTilePriorities();
|
|
|