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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue.h

Issue 2778123003: [scheduler] Add WakeupBudgetPool. (Closed)
Patch Set: Addressed comments Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/optional.h" 10 #include "base/optional.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // order greater than the fence from running until either the fence has been 213 // order greater than the fence from running until either the fence has been
214 // removed or a subsequent fence has unblocked some tasks within the queue. 214 // removed or a subsequent fence has unblocked some tasks within the queue.
215 // Note: delayed tasks get their enqueue order set once their delay has 215 // Note: delayed tasks get their enqueue order set once their delay has
216 // expired, and non-delayed tasks get their enqueue order set when posted. 216 // expired, and non-delayed tasks get their enqueue order set when posted.
217 virtual void InsertFence(InsertFencePosition position) = 0; 217 virtual void InsertFence(InsertFencePosition position) = 0;
218 218
219 // Removes any previously added fence and unblocks execution of any tasks 219 // Removes any previously added fence and unblocks execution of any tasks
220 // blocked by it. 220 // blocked by it.
221 virtual void RemoveFence() = 0; 221 virtual void RemoveFence() = 0;
222 222
223 virtual bool HasFence() const = 0;
224
225 // Returns true if the queue has a fence which is blocking execution of tasks.
223 virtual bool BlockedByFence() const = 0; 226 virtual bool BlockedByFence() const = 0;
224 227
225 virtual void SetObserver(Observer* observer) = 0; 228 virtual void SetObserver(Observer* observer) = 0;
226 229
227 protected: 230 protected:
228 ~TaskQueue() override {} 231 ~TaskQueue() override {}
229 232
230 DISALLOW_COPY_AND_ASSIGN(TaskQueue); 233 DISALLOW_COPY_AND_ASSIGN(TaskQueue);
231 }; 234 };
232 235
233 } // namespace scheduler 236 } // namespace scheduler
234 } // namespace blink 237 } // namespace blink
235 238
236 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ 239 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698