Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5182)

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 272033002: cc: fix pre-painting trigger for GPU rasterization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update unit test. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698