| 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 | |
| 22 class BLINK_PLATFORM_EXPORT CompositorWorkerScheduler | 20 class BLINK_PLATFORM_EXPORT CompositorWorkerScheduler |
| 23 : public WorkerScheduler, | 21 : public WorkerScheduler, |
| 24 public SingleThreadIdleTaskRunner::Delegate { | 22 public SingleThreadIdleTaskRunner::Delegate { |
| 25 public: | 23 public: |
| 26 CompositorWorkerScheduler( | 24 explicit CompositorWorkerScheduler(base::Thread* thread); |
| 27 base::Thread* thread, | |
| 28 scoped_refptr<SchedulerTqmDelegate> main_task_runner); | |
| 29 ~CompositorWorkerScheduler() override; | 25 ~CompositorWorkerScheduler() override; |
| 30 | 26 |
| 31 // WorkerScheduler: | 27 // WorkerScheduler: |
| 32 void Init() override; | 28 void Init() override; |
| 33 | 29 |
| 34 // ChildScheduler: | 30 // ChildScheduler: |
| 35 scoped_refptr<TaskQueue> DefaultTaskRunner() override; | 31 scoped_refptr<TaskQueue> DefaultTaskRunner() override; |
| 36 scoped_refptr<scheduler::SingleThreadIdleTaskRunner> IdleTaskRunner() | 32 scoped_refptr<scheduler::SingleThreadIdleTaskRunner> IdleTaskRunner() |
| 37 override; | 33 override; |
| 38 bool ShouldYieldForHighPriorityWork() override; | 34 bool ShouldYieldForHighPriorityWork() override; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 51 private: | 47 private: |
| 52 base::Thread* thread_; | 48 base::Thread* thread_; |
| 53 | 49 |
| 54 DISALLOW_COPY_AND_ASSIGN(CompositorWorkerScheduler); | 50 DISALLOW_COPY_AND_ASSIGN(CompositorWorkerScheduler); |
| 55 }; | 51 }; |
| 56 | 52 |
| 57 } // namespace scheduler | 53 } // namespace scheduler |
| 58 } // namespace blink | 54 } // namespace blink |
| 59 | 55 |
| 60 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_COMPOSITOR_WORKER_
SCHEDULER_H_ | 56 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_COMPOSITOR_WORKER_
SCHEDULER_H_ |
| OLD | NEW |