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

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

Issue 2781323003: [scheduler] Split lock in TaskQueueImpl. (Closed)
Patch Set: Addressed comments Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "platform/scheduler/base/work_queue.h" 5 #include "platform/scheduler/base/work_queue.h"
6 6
7 #include "platform/scheduler/base/work_queue_sets.h" 7 #include "platform/scheduler/base/work_queue_sets.h"
8 8
9 namespace blink { 9 namespace blink {
10 namespace scheduler { 10 namespace scheduler {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 TaskQueueImpl::Task pending_task = work_queue_.takeFirst(); 113 TaskQueueImpl::Task pending_task = work_queue_.takeFirst();
114 // NB immediate tasks have a different pipeline to delayed ones. 114 // NB immediate tasks have a different pipeline to delayed ones.
115 if (queue_type_ == QueueType::IMMEDIATE && work_queue_.empty()) { 115 if (queue_type_ == QueueType::IMMEDIATE && work_queue_.empty()) {
116 // Short-circuit the queue reload so that OnPopQueue does the right thing. 116 // Short-circuit the queue reload so that OnPopQueue does the right thing.
117 work_queue_ = task_queue_->TakeImmediateIncomingQueue(); 117 work_queue_ = task_queue_->TakeImmediateIncomingQueue();
118 } 118 }
119 // OnPopQueue calls GetFrontTaskEnqueueOrder which checks BlockedByFence() so 119 // OnPopQueue calls GetFrontTaskEnqueueOrder which checks BlockedByFence() so
120 // we don't need to here. 120 // we don't need to here.
121 work_queue_sets_->OnPopQueue(this); 121 work_queue_sets_->OnPopQueue(this);
122 task_queue_->TraceQueueSize(false); 122 task_queue_->TraceQueueSize();
123 return pending_task; 123 return pending_task;
124 } 124 }
125 125
126 void WorkQueue::AssignToWorkQueueSets(WorkQueueSets* work_queue_sets) { 126 void WorkQueue::AssignToWorkQueueSets(WorkQueueSets* work_queue_sets) {
127 work_queue_sets_ = work_queue_sets; 127 work_queue_sets_ = work_queue_sets;
128 } 128 }
129 129
130 void WorkQueue::AssignSetIndex(size_t work_queue_set_index) { 130 void WorkQueue::AssignSetIndex(size_t work_queue_set_index) {
131 work_queue_set_index_ = work_queue_set_index; 131 work_queue_set_index_ = work_queue_set_index;
132 } 132 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 bool have_other_task = 167 bool have_other_task =
168 other_queue->GetFrontTaskEnqueueOrder(&other_enqueue_order); 168 other_queue->GetFrontTaskEnqueueOrder(&other_enqueue_order);
169 DCHECK(have_task); 169 DCHECK(have_task);
170 DCHECK(have_other_task); 170 DCHECK(have_other_task);
171 return enqueue_order < other_enqueue_order; 171 return enqueue_order < other_enqueue_order;
172 } 172 }
173 173
174 } // namespace internal 174 } // namespace internal
175 } // namespace scheduler 175 } // namespace scheduler
176 } // namespace blink 176 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698