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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h

Issue 2546423002: [Try # 3] Scheduler refactoring to virtually eliminate redundant DoWorks (Closed)
Patch Set: Few tweaks Created 4 years 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
Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
index 55bfa458b03c385b67c74f85e6a725b4a5dd569e..f56b3397d45166e600d33c3171d88cb095ff67f2 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
@@ -139,9 +139,16 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue {
const char* GetName() const override;
QueueType GetQueueType() const override;
- // If this returns false then future updates for this queue are not needed
- // unless requested.
- bool MaybeUpdateImmediateWorkQueues();
+ // As BlockedByFence but only safe to be called while |any_thread_| is locked.
+ // Must only be called from the thread this task queue was created on.
+ bool BlockedByFenceLocked() const;
+
+ // Must only be called from the thread this task queue was created on.
+ void OnImmediateWorkQueueHasBecomeEmpty(
+ std::queue<TaskQueueImpl::Task>* work_queue);
+
+ // Must only be called from the thread this task queue was created on.
+ void OnIncomingImmediateTaskAvailable();
void AsValueInto(base::trace_event::TracedValue* state) const;
@@ -290,9 +297,6 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue {
EnqueueOrder sequence_number,
bool nestable);
- // As BlockedByFence but safe to be called while locked.
- bool BlockedByFenceLocked() const;
-
void TraceQueueSize(bool is_locked) const;
static void QueueAsValueInto(const std::queue<Task>& queue,
base::trace_event::TracedValue* state);

Powered by Google App Engine
This is Rietveld 408576698