OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PUBLIC_PLATFORM_SCHEDULER_CHILD_COMPOSITOR_WORKER_SCH
EDULER_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_COMPOSITOR_WORKER_SCH
EDULER_H_ |
6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_COMPOSITOR_WORKER_SCH
EDULER_H_ | 6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_COMPOSITOR_WORKER_SCH
EDULER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "platform/scheduler/child/worker_scheduler.h" | 9 #include "platform/scheduler/child/worker_scheduler.h" |
10 #include "public/platform/WebCommon.h" | 10 #include "public/platform/WebCommon.h" |
11 #include "public/platform/scheduler/child/single_thread_idle_task_runner.h" | 11 #include "public/platform/scheduler/child/single_thread_idle_task_runner.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class Thread; | 14 class Thread; |
15 } | 15 } |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 namespace scheduler { | 18 namespace scheduler { |
19 | 19 |
| 20 class SchedulerTqmDelegate; |
| 21 |
20 class BLINK_PLATFORM_EXPORT CompositorWorkerScheduler | 22 class BLINK_PLATFORM_EXPORT CompositorWorkerScheduler |
21 : public WorkerScheduler, | 23 : public WorkerScheduler, |
22 public SingleThreadIdleTaskRunner::Delegate { | 24 public SingleThreadIdleTaskRunner::Delegate { |
23 public: | 25 public: |
24 explicit CompositorWorkerScheduler(base::Thread* thread); | 26 CompositorWorkerScheduler( |
| 27 base::Thread* thread, |
| 28 scoped_refptr<SchedulerTqmDelegate> main_task_runner); |
25 ~CompositorWorkerScheduler() override; | 29 ~CompositorWorkerScheduler() override; |
26 | 30 |
27 // WorkerScheduler: | 31 // WorkerScheduler: |
28 void Init() override; | 32 void Init() override; |
29 | 33 |
30 // ChildScheduler: | 34 // ChildScheduler: |
31 scoped_refptr<TaskQueue> DefaultTaskRunner() override; | 35 scoped_refptr<TaskQueue> DefaultTaskRunner() override; |
32 scoped_refptr<scheduler::SingleThreadIdleTaskRunner> IdleTaskRunner() | 36 scoped_refptr<scheduler::SingleThreadIdleTaskRunner> IdleTaskRunner() |
33 override; | 37 override; |
34 bool ShouldYieldForHighPriorityWork() override; | 38 bool ShouldYieldForHighPriorityWork() override; |
(...skipping 12 matching lines...) Expand all Loading... |
47 private: | 51 private: |
48 base::Thread* thread_; | 52 base::Thread* thread_; |
49 | 53 |
50 DISALLOW_COPY_AND_ASSIGN(CompositorWorkerScheduler); | 54 DISALLOW_COPY_AND_ASSIGN(CompositorWorkerScheduler); |
51 }; | 55 }; |
52 | 56 |
53 } // namespace scheduler | 57 } // namespace scheduler |
54 } // namespace blink | 58 } // namespace blink |
55 | 59 |
56 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_COMPOSITOR_WORKER_
SCHEDULER_H_ | 60 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_COMPOSITOR_WORKER_
SCHEDULER_H_ |
OLD | NEW |