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

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

Issue 2860813004: Change TaskQueueImpl to use a Deque with an inline capacity of 8 (Closed)
Patch Set: 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_WORK_QUEUE_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_WORK_QUEUE_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_WORK_QUEUE_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_WORK_QUEUE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // empty, then the real value is reported to WorkQueueSets. Returns true if 109 // empty, then the real value is reported to WorkQueueSets. Returns true if
110 // any tasks where unblocked. 110 // any tasks where unblocked.
111 bool RemoveFence(); 111 bool RemoveFence();
112 112
113 // Returns true if any tasks are blocked by the fence. Returns true if the 113 // Returns true if any tasks are blocked by the fence. Returns true if the
114 // queue is empty and fence has been set (i.e. future tasks would be blocked). 114 // queue is empty and fence has been set (i.e. future tasks would be blocked).
115 // Otherwise returns false. 115 // Otherwise returns false.
116 bool BlockedByFence() const; 116 bool BlockedByFence() const;
117 117
118 private: 118 private:
119 WTF::Deque<TaskQueueImpl::Task> work_queue_; 119 TaskQueueImpl::TaskDeque work_queue_;
120 WorkQueueSets* work_queue_sets_; // NOT OWNED. 120 WorkQueueSets* work_queue_sets_; // NOT OWNED.
121 TaskQueueImpl* const task_queue_; // NOT OWNED. 121 TaskQueueImpl* const task_queue_; // NOT OWNED.
122 size_t work_queue_set_index_; 122 size_t work_queue_set_index_;
123 HeapHandle heap_handle_; 123 HeapHandle heap_handle_;
124 const char* const name_; 124 const char* const name_;
125 EnqueueOrder fence_; 125 EnqueueOrder fence_;
126 const QueueType queue_type_; 126 const QueueType queue_type_;
127 127
128 DISALLOW_COPY_AND_ASSIGN(WorkQueue); 128 DISALLOW_COPY_AND_ASSIGN(WorkQueue);
129 }; 129 };
130 130
131 } // namespace internal 131 } // namespace internal
132 } // namespace scheduler 132 } // namespace scheduler
133 } // namespace blink 133 } // namespace blink
134 134
135 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_WORK_QUEUE_H_ 135 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_WORK_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698