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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/work_queue.cc

Issue 2533603002: [scheduler] Add options to TaskQueue::InsertFence (Closed)
Patch Set: More nits Created 4 years, 1 month 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/work_queue.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc b/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc
index 71f6796f76e05118d9c2d20800825a54e06114dc..fe168586f28104b75b14dee6a1869efce6bb80a2 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc
@@ -131,7 +131,7 @@ void WorkQueue::AssignSetIndex(size_t work_queue_set_index) {
bool WorkQueue::InsertFence(EnqueueOrder fence) {
DCHECK_NE(fence, 0u);
- DCHECK_GE(fence, fence_);
+ DCHECK(fence >= fence_ || fence == 1u);
bool was_blocked_by_fence = BlockedByFence();
fence_ = fence;
// Moving the fence forward may unblock some tasks.
@@ -140,6 +140,9 @@ bool WorkQueue::InsertFence(EnqueueOrder fence) {
work_queue_sets_->OnPushQueue(this);
return true;
}
+ // Fence insertion may have blocked all tasks in this work queue.
+ if (BlockedByFence())
+ work_queue_sets_->OnQueueBlocked(this);
return false;
}

Powered by Google App Engine
This is Rietveld 408576698