OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_THROTTLING_HELPER_
H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_THROTTLING_HELPER_
H_ |
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_THROTTLING_HELPER_
H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_THROTTLING_HELPER_
H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <unordered_map> | 9 #include <unordered_map> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/optional.h" | 13 #include "base/optional.h" |
14 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
15 #include "platform/scheduler/base/cancelable_closure_holder.h" | 15 #include "platform/scheduler/base/cancelable_closure_holder.h" |
16 #include "platform/scheduler/base/time_domain.h" | 16 #include "platform/scheduler/base/time_domain.h" |
17 #include "public/platform/WebViewScheduler.h" | 17 #include "public/platform/WebViewScheduler.h" |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 namespace scheduler { | 20 namespace scheduler { |
21 | 21 |
22 class RendererSchedulerImpl; | 22 class RendererSchedulerImpl; |
23 class ThrottledTimeDomain; | 23 class ThrottledTimeDomain; |
24 class WebFrameSchedulerImpl; | |
25 | 24 |
26 // The job of the TaskQueueThrottler is to control when tasks posted on | 25 // The job of the TaskQueueThrottler is to control when tasks posted on |
27 // throttled queues get run. The TaskQueueThrottler: | 26 // throttled queues get run. The TaskQueueThrottler: |
28 // - runs throttled tasks once per second, | 27 // - runs throttled tasks once per second, |
29 // - controls time budget for task queues grouped in TimeBudgetPools. | 28 // - controls time budget for task queues grouped in TimeBudgetPools. |
30 // | 29 // |
31 // This is done by disabling throttled queues and running | 30 // This is done by disabling throttled queues and running |
32 // a special "heart beat" function |PumpThrottledTasks| which when run | 31 // a special "heart beat" function |PumpThrottledTasks| which when run |
33 // temporarily enables throttled queues and inserts a fence to ensure tasks | 32 // temporarily enables throttled queues and inserts a fence to ensure tasks |
34 // posted from a throttled task run next time the queue is pumped. | 33 // posted from a throttled task run next time the queue is pumped. |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 266 |
268 base::WeakPtrFactory<TaskQueueThrottler> weak_factory_; | 267 base::WeakPtrFactory<TaskQueueThrottler> weak_factory_; |
269 | 268 |
270 DISALLOW_COPY_AND_ASSIGN(TaskQueueThrottler); | 269 DISALLOW_COPY_AND_ASSIGN(TaskQueueThrottler); |
271 }; | 270 }; |
272 | 271 |
273 } // namespace scheduler | 272 } // namespace scheduler |
274 } // namespace blink | 273 } // namespace blink |
275 | 274 |
276 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_THROTTLING_HELP
ER_H_ | 275 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_THROTTLING_HELP
ER_H_ |
OLD | NEW |