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 fbc4a820f982496949dce7d3040f3a0518f703c4..e647298034b94177c88aedaf8d3e8fd4ba57c395 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -1647,7 +1647,12 @@ void LayerTreeHostImpl::SetNeedsRedraw() { |
ManagedMemoryPolicy LayerTreeHostImpl::ActualManagedMemoryPolicy() const { |
ManagedMemoryPolicy actual = cached_managed_memory_policy_; |
- if (debug_state_.rasterize_only_visible_content) { |
+ // TODO(ernstm): The second condition disables pre-painting for all layers |
+ // when GPU rasterization is enabled. Once we selectively enable GPU |
+ // rasterization per layer, we also need to disable pre-painting selectively: |
+ // crbug.com/335387 |
+ if (debug_state_.rasterize_only_visible_content || |
+ settings_.gpu_rasterization) { |
actual.priority_cutoff_when_visible = |
gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY; |
} |