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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2701473005: Make purge+throttled feature work with memory coordinator (Closed)
Patch Set: Created 3 years, 10 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') | no next file » | 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 968f4e09c1e8f8188955628043a45f9be0ad7492..a64c1d25d095e97557e4df83fcfe7f11776ee442 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -815,10 +815,6 @@ void RenderThreadImpl::Init(
base::Unretained(this))));
if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) {
- // Currently it is not possible to enable both PurgeAndSuspend and
- // MemoryCoordinator at the same time.
- DCHECK(!base::FeatureList::IsEnabled(features::kPurgeAndSuspend));
-
// Disable MemoryPressureListener when memory coordinator is enabled.
base::MemoryPressureListener::SetNotificationsSuppressed(true);
@@ -1634,11 +1630,6 @@ void RenderThreadImpl::OnProcessBackgrounded(bool backgrounded) {
needs_to_record_first_active_paint_ = false;
} else {
renderer_scheduler_->OnRendererForegrounded();
- // TODO(tasak): after enabling MemoryCoordinator, remove this Notify
- // and follow MemoryCoordinator's request.
- if (base::FeatureList::IsEnabled(features::kPurgeAndSuspend))
- base::MemoryCoordinatorClientRegistry::GetInstance()->Notify(
- base::MemoryState::NORMAL);
record_purge_suspend_metric_closure_.Cancel();
record_purge_suspend_metric_closure_.Reset(
@@ -1656,13 +1647,7 @@ void RenderThreadImpl::OnProcessPurgeAndSuspend() {
if (!RendererIsHidden())
return;
- // TODO(bashi): Enable the tab suspension when MemoryCoordinator is enabled.
- if (base::FeatureList::IsEnabled(features::kMemoryCoordinator))
- return;
-
if (base::FeatureList::IsEnabled(features::kPurgeAndSuspend)) {
- // TODO(tasak): After enabling MemoryCoordinator, remove this Notify
- // and follow MemoryCoordinator's request.
base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory();
}
// Since purging is not a synchronous task (e.g. v8 GC, oilpan GC, ...),
@@ -1835,24 +1820,6 @@ void RenderThreadImpl::RecordPurgeAndSuspendMemoryGrowthMetrics() const {
total_allocated_mb) * 1024);
}
-void RenderThreadImpl::OnProcessResume() {
- ChildThreadImpl::OnProcessResume();
-
- if (!RendererIsHidden())
- return;
-
- // TODO(bashi): Enable the tab suspension when MemoryCoordinator is enabled.
- if (base::FeatureList::IsEnabled(features::kMemoryCoordinator))
- return;
-
- if (base::FeatureList::IsEnabled(features::kPurgeAndSuspend)) {
- // TODO(tasak): after enabling MemoryCoordinator, remove this Notify
- // and follow MemoryCoordinator's request.
- base::MemoryCoordinatorClientRegistry::GetInstance()->Notify(
- base::MemoryState::NORMAL);
- }
-}
-
scoped_refptr<gpu::GpuChannelHost> RenderThreadImpl::EstablishGpuChannelSync() {
TRACE_EVENT0("gpu", "RenderThreadImpl::EstablishGpuChannelSync");
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698