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

Unified Diff: components/scheduler/renderer/renderer_scheduler_impl.cc

Issue 1447563002: Implement frame attribution (FrameBlamer) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 4 years, 9 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
Index: components/scheduler/renderer/renderer_scheduler_impl.cc
diff --git a/components/scheduler/renderer/renderer_scheduler_impl.cc b/components/scheduler/renderer/renderer_scheduler_impl.cc
index 04d56f2dd523d141cae5b53f5ecb09063674ca0c..115ef90db8dc66bb70cbc81cc5b3b8cc89a63f6f 100644
--- a/components/scheduler/renderer/renderer_scheduler_impl.cc
+++ b/components/scheduler/renderer/renderer_scheduler_impl.cc
@@ -1153,6 +1153,22 @@ void RendererSchedulerImpl::ResetForNavigationLocked() {
UpdatePolicyLocked(UpdateType::MAY_EARLY_OUT_IF_POLICY_UNCHANGED);
}
+void RendererSchedulerImpl::SetThreadBlameContext(
+ base::trace_event::BlameContext* blame_context) {
+ // Any task that runs in the default task runners belongs to the context of
+ // the current thread (as opposed to a particular frame). Note that the task
+ // itself may still enter a more specific blame context if necessary.
+ //
+ // Per-frame task runners (loading, timers, etc.) are configured with a more
+ // specific blame context by WebFrameSchedulerImpl.
+ control_task_runner_->SetBlameContext(blame_context);
+ DefaultTaskRunner()->SetBlameContext(blame_context);
+ default_loading_task_runner_->SetBlameContext(blame_context);
+ default_timer_task_runner_->SetBlameContext(blame_context);
+ compositor_task_runner_->SetBlameContext(blame_context);
+ idle_helper_.IdleTaskRunner()->SetBlameContext(blame_context);
+}
+
void RendererSchedulerImpl::RegisterTimeDomain(TimeDomain* time_domain) {
helper_.RegisterTimeDomain(time_domain);
}

Powered by Google App Engine
This is Rietveld 408576698