| OLD | NEW |
| 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 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 for (auto& web_view_scheduler : MainThreadOnly().web_view_schedulers_) | 1162 for (auto& web_view_scheduler : MainThreadOnly().web_view_schedulers_) |
| 1163 web_view_scheduler->AddConsoleWarning(message); | 1163 web_view_scheduler->AddConsoleWarning(message); |
| 1164 } | 1164 } |
| 1165 | 1165 |
| 1166 void RendererSchedulerImpl::OnTriedToExecuteBlockedTask( | 1166 void RendererSchedulerImpl::OnTriedToExecuteBlockedTask( |
| 1167 const TaskQueue& queue, | 1167 const TaskQueue& queue, |
| 1168 const base::PendingTask& task) { | 1168 const base::PendingTask& task) { |
| 1169 if (!MainThreadOnly().have_reported_blocking_intervention_in_current_policy) { | 1169 if (!MainThreadOnly().have_reported_blocking_intervention_in_current_policy) { |
| 1170 MainThreadOnly().have_reported_blocking_intervention_in_current_policy = | 1170 MainThreadOnly().have_reported_blocking_intervention_in_current_policy = |
| 1171 true; | 1171 true; |
| 1172 TRACE_TASK_EXECUTION("RendererSchedulerImpl::TaskBlocked", task); | 1172 TRACE_EVENT_INSTANT0("renderer.scheduler", |
| 1173 "RendererSchedulerImpl::TaskBlocked", |
| 1174 TRACE_EVENT_SCOPE_THREAD); |
| 1173 } | 1175 } |
| 1174 | 1176 |
| 1175 if (!MainThreadOnly().have_reported_blocking_intervention_since_navigation) { | 1177 if (!MainThreadOnly().have_reported_blocking_intervention_since_navigation) { |
| 1176 { | 1178 { |
| 1177 base::AutoLock lock(any_thread_lock_); | 1179 base::AutoLock lock(any_thread_lock_); |
| 1178 if (!AnyThread().have_seen_touchstart) | 1180 if (!AnyThread().have_seen_touchstart) |
| 1179 return; | 1181 return; |
| 1180 } | 1182 } |
| 1181 MainThreadOnly().have_reported_blocking_intervention_since_navigation = | 1183 MainThreadOnly().have_reported_blocking_intervention_since_navigation = |
| 1182 true; | 1184 true; |
| 1183 BroadcastConsoleWarning( | 1185 BroadcastConsoleWarning( |
| 1184 "Deferred long-running timer task(s) to improve scrolling smoothness. " | 1186 "Deferred long-running timer task(s) to improve scrolling smoothness. " |
| 1185 "See crbug.com/574343."); | 1187 "See crbug.com/574343."); |
| 1186 } | 1188 } |
| 1187 } | 1189 } |
| 1188 | 1190 |
| 1189 } // namespace scheduler | 1191 } // namespace scheduler |
| OLD | NEW |