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

Side by Side Diff: third_party/WebKit/public/platform/scheduler/base/task_queue.h

Issue 2533603002: [scheduler] Add options to TaskQueue::InsertFence (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler_unittest.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 #ifndef THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ 5 #ifndef THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_
6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ 6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/optional.h" 10 #include "base/optional.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 virtual void SetTimeDomain(TimeDomain* domain) = 0; 170 virtual void SetTimeDomain(TimeDomain* domain) = 0;
171 171
172 // Returns the queue's current TimeDomain. Can be called from any thread. 172 // Returns the queue's current TimeDomain. Can be called from any thread.
173 virtual TimeDomain* GetTimeDomain() const = 0; 173 virtual TimeDomain* GetTimeDomain() const = 0;
174 174
175 // Inserts a barrier into the task queue which inhibits non-delayed tasks 175 // Inserts a barrier into the task queue which inhibits non-delayed tasks
176 // posted after this point, or delayed tasks which are not yet ready to run, 176 // posted after this point, or delayed tasks which are not yet ready to run,
177 // from being executed until the fence is cleared. If a fence already existed 177 // from being executed until the fence is cleared. If a fence already existed
178 // the one supersedes it and previously blocked tasks will now run up until 178 // the one supersedes it and previously blocked tasks will now run up until
179 // the new fence is hit. 179 // the new fence is hit.
180 virtual void InsertFence() = 0; 180 virtual void InsertFence() = 0;
alex clarke (OOO till 29th) 2016/11/25 15:06:38 sorry for the bike shed, but I'm thinking we shoul
altimin 2016/11/25 15:55:27 Done.
181 181
182 // Inserts a barrier in the front of the task queue which inhibits all tasks,
183 // effectively disabling this queue. This allows to block task queue for
184 // throttling purposes without interfering with enabling and disabling
185 // task queues for policy reasons.
186 virtual void BlockByFence() = 0;
187
182 // Removes any previously added fence and unblocks execution of any tasks 188 // Removes any previously added fence and unblocks execution of any tasks
183 // blocked by it. 189 // blocked by it.
184 virtual void RemoveFence() = 0; 190 virtual void RemoveFence() = 0;
185 191
186 virtual bool BlockedByFence() const = 0; 192 virtual bool BlockedByFence() const = 0;
187 193
188 protected: 194 protected:
189 ~TaskQueue() override {} 195 ~TaskQueue() override {}
190 196
191 DISALLOW_COPY_AND_ASSIGN(TaskQueue); 197 DISALLOW_COPY_AND_ASSIGN(TaskQueue);
192 }; 198 };
193 199
194 } // namespace scheduler 200 } // namespace scheduler
195 } // namespace blink 201 } // namespace blink
196 202
197 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_ 203 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_H_
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698