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

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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 AnyThread().user_model.Reset(helper_.scheduler_tqm_delegate()->NowTicks()); 1121 AnyThread().user_model.Reset(helper_.scheduler_tqm_delegate()->NowTicks());
1122 AnyThread().have_seen_touchstart = false; 1122 AnyThread().have_seen_touchstart = false;
1123 MainThreadOnly().loading_task_cost_estimator.Clear(); 1123 MainThreadOnly().loading_task_cost_estimator.Clear();
1124 MainThreadOnly().timer_task_cost_estimator.Clear(); 1124 MainThreadOnly().timer_task_cost_estimator.Clear();
1125 MainThreadOnly().idle_time_estimator.Clear(); 1125 MainThreadOnly().idle_time_estimator.Clear();
1126 MainThreadOnly().have_seen_a_begin_main_frame = false; 1126 MainThreadOnly().have_seen_a_begin_main_frame = false;
1127 MainThreadOnly().have_reported_blocking_intervention_since_navigation = false; 1127 MainThreadOnly().have_reported_blocking_intervention_since_navigation = false;
1128 UpdatePolicyLocked(UpdateType::MAY_EARLY_OUT_IF_POLICY_UNCHANGED); 1128 UpdatePolicyLocked(UpdateType::MAY_EARLY_OUT_IF_POLICY_UNCHANGED);
1129 } 1129 }
1130 1130
1131 void RendererSchedulerImpl::SetThreadBlameContext(
1132 base::trace_event::BlameContext* blame_context) {
1133 // Any task that runs in the default task runners belongs to the context of
1134 // the current thread (as opposed to a particular frame). Note that the task
1135 // itself may still enter a more specific blame context if necessary.
1136 control_task_runner_->SetBlameContext(blame_context);
1137 DefaultTaskRunner()->SetBlameContext(blame_context);
1138 default_loading_task_runner_->SetBlameContext(blame_context);
1139 default_timer_task_runner_->SetBlameContext(blame_context);
1140 compositor_task_runner_->SetBlameContext(blame_context);
1141 idle_helper_.IdleTaskRunner()->SetBlameContext(blame_context);
alex clarke (OOO till 29th) 2016/03/21 14:38:36 Maybe add a note that loading_task_runners_ and ti
Sami 2016/03/21 15:18:05 Done.
1142 }
1143
1131 void RendererSchedulerImpl::RegisterTimeDomain(TimeDomain* time_domain) { 1144 void RendererSchedulerImpl::RegisterTimeDomain(TimeDomain* time_domain) {
1132 helper_.RegisterTimeDomain(time_domain); 1145 helper_.RegisterTimeDomain(time_domain);
1133 } 1146 }
1134 1147
1135 void RendererSchedulerImpl::UnregisterTimeDomain(TimeDomain* time_domain) { 1148 void RendererSchedulerImpl::UnregisterTimeDomain(TimeDomain* time_domain) {
1136 helper_.UnregisterTimeDomain(time_domain); 1149 helper_.UnregisterTimeDomain(time_domain);
1137 } 1150 }
1138 1151
1139 void RendererSchedulerImpl::SetExpensiveTaskBlockingAllowed(bool allowed) { 1152 void RendererSchedulerImpl::SetExpensiveTaskBlockingAllowed(bool allowed) {
1140 MainThreadOnly().expensive_task_blocking_allowed = allowed; 1153 MainThreadOnly().expensive_task_blocking_allowed = allowed;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 } 1193 }
1181 MainThreadOnly().have_reported_blocking_intervention_since_navigation = 1194 MainThreadOnly().have_reported_blocking_intervention_since_navigation =
1182 true; 1195 true;
1183 BroadcastConsoleWarning( 1196 BroadcastConsoleWarning(
1184 "Deferred long-running timer task(s) to improve scrolling smoothness. " 1197 "Deferred long-running timer task(s) to improve scrolling smoothness. "
1185 "See crbug.com/574343."); 1198 "See crbug.com/574343.");
1186 } 1199 }
1187 } 1200 }
1188 1201
1189 } // namespace scheduler 1202 } // namespace scheduler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698