| Index: Source/platform/scheduler/Scheduler.h
|
| diff --git a/Source/platform/scheduler/Scheduler.h b/Source/platform/scheduler/Scheduler.h
|
| index 91fe5384fa7b53e548efb0558ee76b3386a93810..44cc0ef5567e0a6b06538b633266340364f1f8ae 100644
|
| --- a/Source/platform/scheduler/Scheduler.h
|
| +++ b/Source/platform/scheduler/Scheduler.h
|
| @@ -6,7 +6,7 @@
|
| #define Scheduler_h
|
|
|
| #include "platform/PlatformExport.h"
|
| -#include "platform/TraceLocation.h"
|
| +#include "platform/scheduler/TracedTask.h"
|
| #include "wtf/DoubleBufferedDeque.h"
|
| #include "wtf/Functional.h"
|
| #include "wtf/Noncopyable.h"
|
| @@ -69,24 +69,13 @@ protected:
|
| CompositorPriority,
|
| };
|
|
|
| - class TracedTask {
|
| - public:
|
| - TracedTask(const Task& task, const TraceLocation& location)
|
| - : m_task(task)
|
| - , m_location(location) { }
|
| -
|
| - void run();
|
| -
|
| - private:
|
| - Task m_task;
|
| - TraceLocation m_location;
|
| - };
|
| -
|
| Scheduler();
|
| virtual ~Scheduler();
|
|
|
| - static void sharedTimerAdapter();
|
| + void scheduleIdleTask(const TraceLocation&, const IdleTask&);
|
| + void postHighPriorityTaskInternal(const TraceLocation&, const Task&, const char* traceName);
|
|
|
| + static void sharedTimerAdapter();
|
|
|
| // Start of main thread only members -----------------------------------
|
|
|
| @@ -115,9 +104,6 @@ protected:
|
|
|
| // End of main thread only members -------------------------------------
|
|
|
| -
|
| - void scheduleIdleTask(const TraceLocation&, const IdleTask&);
|
| -
|
| bool hasPendingHighPriorityWork() const;
|
|
|
| void enterSchedulerPolicyLocked(SchedulerPolicy);
|
| @@ -134,7 +120,9 @@ protected:
|
| DoubleBufferedDeque<TracedTask> m_pendingHighPriorityTasks;
|
| double m_compositorPriorityPolicyEndTimeSeconds;
|
|
|
| + // Declared volatile as it is atomically incremented.
|
| volatile int m_highPriorityTaskCount;
|
| +
|
| bool m_highPriorityTaskRunnerPosted;
|
|
|
| // Don't access m_schedulerPolicy directly, use enterSchedulerPolicyLocked and SchedulerPolicy instead.
|
|
|