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

Unified Diff: ui/compositor/compositor.cc

Issue 1413003005: Set gpu memory policy in UI compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve bot failures. Created 5 years, 1 month 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: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index e2783947ffad762ea8adf17d6a4e5b99400555fb..264e2fe1920dc003ba6817e5a124385d6abbba01 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -166,6 +166,14 @@ Compositor::Compositor(ui::ContextFactory* context_factory,
settings.use_compositor_animation_timelines =
command_line->HasSwitch(switches::kUIEnableCompositorAnimationTimelines);
+#if !defined(OS_ANDROID)
+ // TODO(sohanjg): Revisit this memory usage in tile manager.
+ cc::ManagedMemoryPolicy policy(
+ 512 * 1024 * 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE,
+ settings.memory_policy_.num_resources_limit);
+ settings.memory_policy_ = policy;
+#endif
+
base::TimeTicks before_create = base::TimeTicks::Now();
cc::LayerTreeHost::InitParams params;
« 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