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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 void RendererSchedulerImpl::Shutdown() { | 146 void RendererSchedulerImpl::Shutdown() { |
147 throttling_helper_.reset(); | 147 throttling_helper_.reset(); |
148 helper_.Shutdown(); | 148 helper_.Shutdown(); |
149 MainThreadOnly().was_shutdown = true; | 149 MainThreadOnly().was_shutdown = true; |
150 } | 150 } |
151 | 151 |
152 scoped_ptr<blink::WebThread> RendererSchedulerImpl::CreateMainThread() { | 152 scoped_ptr<blink::WebThread> RendererSchedulerImpl::CreateMainThread() { |
153 return make_scoped_ptr(new WebThreadImplForRendererScheduler(this)); | 153 return make_scoped_ptr(new WebThreadImplForRendererScheduler(this)); |
154 } | 154 } |
155 | 155 |
156 scoped_refptr<base::SingleThreadTaskRunner> | 156 scoped_refptr<TaskQueue> RendererSchedulerImpl::DefaultTaskRunner() { |
157 RendererSchedulerImpl::DefaultTaskRunner() { | |
158 return helper_.DefaultTaskRunner(); | 157 return helper_.DefaultTaskRunner(); |
159 } | 158 } |
160 | 159 |
161 scoped_refptr<base::SingleThreadTaskRunner> | 160 scoped_refptr<TaskQueue> RendererSchedulerImpl::CompositorTaskRunner() { |
162 RendererSchedulerImpl::CompositorTaskRunner() { | |
163 helper_.CheckOnValidThread(); | 161 helper_.CheckOnValidThread(); |
164 return compositor_task_runner_; | 162 return compositor_task_runner_; |
165 } | 163 } |
166 | 164 |
167 scoped_refptr<SingleThreadIdleTaskRunner> | 165 scoped_refptr<SingleThreadIdleTaskRunner> |
168 RendererSchedulerImpl::IdleTaskRunner() { | 166 RendererSchedulerImpl::IdleTaskRunner() { |
169 return idle_helper_.IdleTaskRunner(); | 167 return idle_helper_.IdleTaskRunner(); |
170 } | 168 } |
171 | 169 |
172 scoped_refptr<base::SingleThreadTaskRunner> | 170 scoped_refptr<TaskQueue> RendererSchedulerImpl::LoadingTaskRunner() { |
173 RendererSchedulerImpl::LoadingTaskRunner() { | |
174 helper_.CheckOnValidThread(); | 171 helper_.CheckOnValidThread(); |
175 return default_loading_task_runner_; | 172 return default_loading_task_runner_; |
176 } | 173 } |
177 | 174 |
178 scoped_refptr<TaskQueue> RendererSchedulerImpl::TimerTaskRunner() { | 175 scoped_refptr<TaskQueue> RendererSchedulerImpl::TimerTaskRunner() { |
179 helper_.CheckOnValidThread(); | 176 helper_.CheckOnValidThread(); |
180 return default_timer_task_runner_; | 177 return default_timer_task_runner_; |
181 } | 178 } |
182 | 179 |
183 scoped_refptr<TaskQueue> RendererSchedulerImpl::ControlTaskRunner() { | 180 scoped_refptr<TaskQueue> RendererSchedulerImpl::ControlTaskRunner() { |
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 } | 1201 } |
1205 MainThreadOnly().have_reported_blocking_intervention_since_navigation = | 1202 MainThreadOnly().have_reported_blocking_intervention_since_navigation = |
1206 true; | 1203 true; |
1207 BroadcastConsoleWarning( | 1204 BroadcastConsoleWarning( |
1208 "Deferred long-running timer task(s) to improve scrolling smoothness. " | 1205 "Deferred long-running timer task(s) to improve scrolling smoothness. " |
1209 "See crbug.com/574343."); | 1206 "See crbug.com/574343."); |
1210 } | 1207 } |
1211 } | 1208 } |
1212 | 1209 |
1213 } // namespace scheduler | 1210 } // namespace scheduler |
OLD | NEW |