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

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

Issue 640053003: Modify the scheduler to queue idle work between idle periods. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop extra {} 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 a2a15f4fc4bcd62bb4e6757cb0b3ed4bf3e3a94d..e63eb192000c512045e941537901b791b6d1f611 100644
--- a/Source/platform/scheduler/Scheduler.h
+++ b/Source/platform/scheduler/Scheduler.h
@@ -97,11 +97,12 @@ protected:
// Only does work if canRunIdleTask. Returns true if any work was done.
bool maybeRunPendingIdleTask();
- PassOwnPtr<internal::TracedIdleTask> takeFirstPendingIdleTask();
-
// Returns true if the scheduler can run idle tasks at this time.
bool canRunIdleTask() const;
+ // Flush the incoming idle tasks to the end of the pending idle task queue.
+ void flushIncomingIdleTasks();
+
// Return the current SchedulerPolicy.
SchedulerPolicy schedulerPolicy() const;
@@ -120,12 +121,14 @@ protected:
WebThread* m_mainThread;
- // This mutex protects calls to the pending idle task queue.
- Mutex m_pendingIdleTasksMutex;
- Deque<OwnPtr<internal::TracedIdleTask>> m_pendingIdleTasks;
+ // This mutex protects calls to the incoming idle task queue.
+ Mutex m_incomingIdleTasksMutex;
+ Deque<OwnPtr<internal::TracedIdleTask>> m_incomingIdleTasks;
bool m_currentFrameCommitted;
double m_estimatedNextBeginFrameSeconds;
+ Deque<OwnPtr<internal::TracedIdleTask>> m_pendingIdleTasks;
+
// Declared volatile as it is atomically incremented.
volatile int m_highPriorityTaskCount;
« 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