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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 14061028: cc: Set tile manager memory policy in initializeRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | no next file » | 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 a96608952e5dde5824227e42ee3184b2f741a01e..c708b6e52041e5c86905cd404930aeb2253b94ba 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1393,6 +1393,14 @@ bool LayerTreeHostImpl::InitializeRenderer(
renderer_ = SoftwareRenderer::Create(this,
output_surface.get(),
resource_provider.get());
+
+ const size_t software_memory_limit_when_visible = 128 * 1024 * 1024;
+ const size_t software_memory_limit_when_not_visible = 64 * 1024 * 1024;
+ SetManagedMemoryPolicy(ManagedMemoryPolicy(
+ software_memory_limit_when_visible,
+ ManagedMemoryPolicy::CUTOFF_ALLOW_EVERYTHING,
+ software_memory_limit_when_not_visible,
+ ManagedMemoryPolicy::CUTOFF_ALLOW_REQUIRED_ONLY));
ccameron 2013/04/29 23:58:46 I'd suggest 0 and NOTHING for non-visible tabs (ca
}
if (!renderer_)
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698