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

Side by Side 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: Cleanup. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/scheduler/renderer/renderer_scheduler_impl.h" 5 #include "components/scheduler/renderer/renderer_scheduler_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 AnyThread().user_model.Reset(helper_.scheduler_tqm_delegate()->NowTicks()); 1120 AnyThread().user_model.Reset(helper_.scheduler_tqm_delegate()->NowTicks());
1121 AnyThread().have_seen_touchstart = false; 1121 AnyThread().have_seen_touchstart = false;
1122 MainThreadOnly().loading_task_cost_estimator.Clear(); 1122 MainThreadOnly().loading_task_cost_estimator.Clear();
1123 MainThreadOnly().timer_task_cost_estimator.Clear(); 1123 MainThreadOnly().timer_task_cost_estimator.Clear();
1124 MainThreadOnly().idle_time_estimator.Clear(); 1124 MainThreadOnly().idle_time_estimator.Clear();
1125 MainThreadOnly().have_seen_a_begin_main_frame = false; 1125 MainThreadOnly().have_seen_a_begin_main_frame = false;
1126 MainThreadOnly().have_reported_blocking_intervention_since_navigation = false; 1126 MainThreadOnly().have_reported_blocking_intervention_since_navigation = false;
1127 UpdatePolicyLocked(UpdateType::MAY_EARLY_OUT_IF_POLICY_UNCHANGED); 1127 UpdatePolicyLocked(UpdateType::MAY_EARLY_OUT_IF_POLICY_UNCHANGED);
1128 } 1128 }
1129 1129
1130 void RendererSchedulerImpl::SetThreadBlameContext(
1131 base::debug::BlameContextBase* blame_context) {
1132 // Any task that runs in the default task runners belongs to the context of
1133 // the current thread (as opposed to a particular frame). Note that the task
1134 // itself may still enter a more specific blame context if necessary.
1135 control_task_runner_->SetBlameContext(blame_context);
1136 DefaultTaskRunner()->SetBlameContext(blame_context);
1137 default_loading_task_runner_->SetBlameContext(blame_context);
1138 default_timer_task_runner_->SetBlameContext(blame_context);
1139 compositor_task_runner_->SetBlameContext(blame_context);
1140 idle_helper_.IdleTaskRunner()->SetBlameContext(blame_context);
1141 }
1142
1130 void RendererSchedulerImpl::RegisterTimeDomain(TimeDomain* time_domain) { 1143 void RendererSchedulerImpl::RegisterTimeDomain(TimeDomain* time_domain) {
1131 helper_.RegisterTimeDomain(time_domain); 1144 helper_.RegisterTimeDomain(time_domain);
1132 } 1145 }
1133 1146
1134 void RendererSchedulerImpl::UnregisterTimeDomain(TimeDomain* time_domain) { 1147 void RendererSchedulerImpl::UnregisterTimeDomain(TimeDomain* time_domain) {
1135 helper_.UnregisterTimeDomain(time_domain); 1148 helper_.UnregisterTimeDomain(time_domain);
1136 } 1149 }
1137 1150
1138 void RendererSchedulerImpl::SetExpensiveTaskBlockingAllowed(bool allowed) { 1151 void RendererSchedulerImpl::SetExpensiveTaskBlockingAllowed(bool allowed) {
1139 MainThreadOnly().expensive_task_blocking_allowed = allowed; 1152 MainThreadOnly().expensive_task_blocking_allowed = allowed;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 } 1192 }
1180 MainThreadOnly().have_reported_blocking_intervention_since_navigation = 1193 MainThreadOnly().have_reported_blocking_intervention_since_navigation =
1181 true; 1194 true;
1182 BroadcastConsoleWarning( 1195 BroadcastConsoleWarning(
1183 "Deferred long-running timer task(s) to improve scrolling smoothness. " 1196 "Deferred long-running timer task(s) to improve scrolling smoothness. "
1184 "See crbug.com/574343."); 1197 "See crbug.com/574343.");
1185 } 1198 }
1186 } 1199 }
1187 1200
1188 } // namespace scheduler 1201 } // namespace scheduler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698