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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2094583002: Add MemoryCoordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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 | « content/renderer/render_thread_impl.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 660b52bedbb249e4e9c8877f6dd009aa38083e2b..1a4a026079f996e0175ef33cb8e2db71c4c849b5 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -46,6 +46,7 @@
#include "cc/raster/task_graph_runner.h"
#include "cc/trees/layer_tree_host_common.h"
#include "cc/trees/layer_tree_settings.h"
+#include "components/memory_coordinator/child/child_memory_coordinator_impl.h"
#include "components/scheduler/child/compositor_worker_scheduler.h"
#include "components/scheduler/child/webthread_base.h"
#include "components/scheduler/child/webthread_impl_for_worker_scheduler.h"
@@ -823,6 +824,15 @@ void RenderThreadImpl::Init(
base::Bind(&RenderThreadImpl::OnSyncMemoryPressure,
base::Unretained(this))));
+ if (memory_coordinator::IsEnabled()) {
+ // TODO(bashi): Revisit how to manage the lifetime of
+ // ChildMemoryCoordinatorImpl.
+ // https://codereview.chromium.org/2094583002/#msg52
+ memory_coordinator_.reset(
+ new memory_coordinator::ChildMemoryCoordinatorImpl(
+ GetRemoteInterfaces()));
+ }
+
int num_raster_threads = 0;
std::string string_value =
command_line.GetSwitchValueASCII(switches::kNumRasterThreads);
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698