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 bf37c5139d20b2e866efe99ebd520aa06dd0661d..e273f7a031cd59e42f8877b7d9e50ddb8ecc838b 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -1778,13 +1778,13 @@ void LayerTreeHostImpl::SetNeedsRedraw() { |
ManagedMemoryPolicy LayerTreeHostImpl::ActualManagedMemoryPolicy() const { |
ManagedMemoryPolicy actual = cached_managed_memory_policy_; |
- // TODO(ernstm): NICE_TO_HAVE is currently triggered for forced GPU |
- // rasterization only. Change the trigger to LTHI::UseGpuRasterization, once |
- // that is implemented. |
+ bool any_tree_use_gpu_rasterization = |
+ (active_tree_ && active_tree_->use_gpu_rasterization()) || |
+ (pending_tree_ && pending_tree_->use_gpu_rasterization()); |
if (debug_state_.rasterize_only_visible_content) { |
actual.priority_cutoff_when_visible = |
gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY; |
- } else if (settings_.gpu_rasterization_forced) { |
+ } else if (any_tree_use_gpu_rasterization) { |
actual.priority_cutoff_when_visible = |
gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; |
} |