Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2747)

Unified Diff: Source/platform/scheduler/Scheduler.h

Issue 621363002: scheduler: Post high priority tasks directly to the message loop (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test tweak. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/platform/scheduler/Scheduler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scheduler/Scheduler.h
diff --git a/Source/platform/scheduler/Scheduler.h b/Source/platform/scheduler/Scheduler.h
index 7f7835abcf76d6ac90c6780e6fdad520e3808d80..ef8366eb75a52c5c898f7c763f678c971fa7d8f3 100644
--- a/Source/platform/scheduler/Scheduler.h
+++ b/Source/platform/scheduler/Scheduler.h
@@ -75,6 +75,7 @@ protected:
void scheduleIdleTask(const TraceLocation&, const IdleTask&);
void postHighPriorityTaskInternal(const TraceLocation&, const Task&, const char* traceName);
+ void didRunHighPriorityTask();
static void sharedTimerAdapter();
@@ -84,20 +85,12 @@ protected:
bool runPendingHighPriorityTasksIfInCompositorPriority();
// Returns true if any work was done.
- bool swapQueuesAndRunPendingTasks();
-
- void swapQueuesRunPendingTasksAndAllowHighPriorityTaskRunnerPosting();
-
- // Returns true if any work was done.
bool executeHighPriorityTasks(Deque<TracedTask>&);
// Return the current SchedulerPolicy.
SchedulerPolicy schedulerPolicy() const;
- void maybeEnterNormalSchedulerPolicy();
-
- // Must be called while m_pendingTasksMutex is locked.
- void maybePostMainThreadPendingHighPriorityTaskRunner();
+ void updatePolicy();
void tickSharedTimer();
@@ -105,28 +98,22 @@ protected:
// End of main thread only members -------------------------------------
- bool hasPendingHighPriorityWork() const;
-
void enterSchedulerPolicyLocked(SchedulerPolicy);
-
void enterSchedulerPolicy(SchedulerPolicy);
static Scheduler* s_sharedScheduler;
WebThread* m_mainThread;
- // This mutex protects calls to the pending task queue, m_highPriorityTaskRunnerPosted and
- // m_compositorPriorityPolicyEndTimeSeconds.
- Mutex m_pendingTasksMutex;
- 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.
+ Mutex m_policyStateMutex;
+ double m_compositorPriorityPolicyEndTimeSeconds;
+
+ // Don't access m_schedulerPolicy directly, use enterSchedulerPolicyLocked and schedulerPolicy instead.
volatile int m_schedulerPolicy;
};
« no previous file with comments | « no previous file | Source/platform/scheduler/Scheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698