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

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

Issue 2533603002: [scheduler] Add options to TaskQueue::InsertFence (Closed)
Patch Set: Reupload 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 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_IMPL_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 bool HasPendingImmediateWork() const override; 126 bool HasPendingImmediateWork() const override;
127 base::Optional<base::TimeTicks> GetNextScheduledWakeUp() override; 127 base::Optional<base::TimeTicks> GetNextScheduledWakeUp() override;
128 void SetQueuePriority(QueuePriority priority) override; 128 void SetQueuePriority(QueuePriority priority) override;
129 QueuePriority GetQueuePriority() const override; 129 QueuePriority GetQueuePriority() const override;
130 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; 130 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override;
131 void RemoveTaskObserver( 131 void RemoveTaskObserver(
132 base::MessageLoop::TaskObserver* task_observer) override; 132 base::MessageLoop::TaskObserver* task_observer) override;
133 void SetTimeDomain(TimeDomain* time_domain) override; 133 void SetTimeDomain(TimeDomain* time_domain) override;
134 TimeDomain* GetTimeDomain() const override; 134 TimeDomain* GetTimeDomain() const override;
135 void SetBlameContext(base::trace_event::BlameContext* blame_context) override; 135 void SetBlameContext(base::trace_event::BlameContext* blame_context) override;
136 void InsertFence() override; 136 void InsertFence(InsertFencePosition position) override;
137 void RemoveFence() override; 137 void RemoveFence() override;
138 bool BlockedByFence() const override; 138 bool BlockedByFence() const override;
139 139
140 // If this returns false then future updates for this queue are not needed 140 // If this returns false then future updates for this queue are not needed
141 // unless requested. 141 // unless requested.
142 bool MaybeUpdateImmediateWorkQueues(); 142 bool MaybeUpdateImmediateWorkQueues();
143 143
144 const char* GetName() const override; 144 const char* GetName() const override;
145 QueueType GetQueueType() const override; 145 QueueType GetQueueType() const override;
146 146
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 main_thread_only().scheduled_time_domain_wakeup = 186 main_thread_only().scheduled_time_domain_wakeup =
187 scheduled_time_domain_wakeup; 187 scheduled_time_domain_wakeup;
188 } 188 }
189 189
190 HeapHandle heap_handle() const { return main_thread_only().heap_handle; } 190 HeapHandle heap_handle() const { return main_thread_only().heap_handle; }
191 191
192 void set_heap_handle(HeapHandle heap_handle) { 192 void set_heap_handle(HeapHandle heap_handle) {
193 main_thread_only().heap_handle = heap_handle; 193 main_thread_only().heap_handle = heap_handle;
194 } 194 }
195 195
196 // Returns true if queue is enabled and is not blocked by fence.
197 // Test-only and main-thread-only.
198 bool IsQueueUnblockedForTest() const;
alex clarke (OOO till 29th) 2016/11/25 16:20:49 minor: I'd slightly prefer a GetFenceForTest() and
altimin 2016/11/25 16:59:25 Done.
199
196 private: 200 private:
197 friend class WorkQueue; 201 friend class WorkQueue;
198 friend class WorkQueueTest; 202 friend class WorkQueueTest;
199 203
200 enum class TaskType { 204 enum class TaskType {
201 NORMAL, 205 NORMAL,
202 NON_NESTABLE, 206 NON_NESTABLE,
203 }; 207 };
204 208
205 struct AnyThread { 209 struct AnyThread {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 const bool should_report_when_execution_blocked_; 320 const bool should_report_when_execution_blocked_;
317 321
318 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); 322 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl);
319 }; 323 };
320 324
321 } // namespace internal 325 } // namespace internal
322 } // namespace scheduler 326 } // namespace scheduler
323 } // namespace blink 327 } // namespace blink
324 328
325 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ 329 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698