Chromium Code Reviews| Index: Source/platform/scheduler/Scheduler.h |
| diff --git a/Source/platform/scheduler/Scheduler.h b/Source/platform/scheduler/Scheduler.h |
| index 654764e53723ef12efb4cb601b124f88e5c426d2..f9d21fdaf254896977e99bf02bf591b9d486747d 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" |
| @@ -56,23 +56,11 @@ private: |
| friend class MainThreadPendingTaskRunner; |
| friend class MainThreadPendingHighPriorityTaskRunner; |
| - 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(); |
| ~Scheduler(); |
| void scheduleIdleTask(const TraceLocation&, const IdleTask&); |
| + void postHighPriorityTaskInternal(const TraceLocation&, const Task&, const char* traceName); |
| static void sharedTimerAdapter(); |
| void tickSharedTimer(); |
| @@ -87,6 +75,8 @@ private: |
| // Must be called while m_pendingTasksMutex is locked. |
| void maybePostMainThreadPendingHighPriorityTaskRunner(); |
| + int generateFlowTraceID(); |
|
eseidel
2014/09/02 16:19:25
No type?
picksi1
2014/09/03 16:32:57
I don't know what you are asking for here? Are you
|
| + |
| static Scheduler* s_sharedScheduler; |
| // Should only be accessed from the main thread. |
| @@ -99,7 +89,10 @@ private: |
| Mutex m_pendingTasksMutex; |
| DoubleBufferedDeque<TracedTask> m_pendingHighPriorityTasks; |
| + // Declared volatile as they are atomically incremented. |
| volatile int m_highPriorityTaskCount; |
| + volatile int m_nextFlowTraceID; |
| + |
| bool m_highPriorityTaskRunnerPosted; |
| }; |