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

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

Issue 2654433002: Cache delegate_->IsNested() in TaskQueueManager::DoWork (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MANAGER_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 EXECUTED, 192 EXECUTED,
193 TASK_QUEUE_MANAGER_DELETED 193 TASK_QUEUE_MANAGER_DELETED
194 }; 194 };
195 195
196 // Runs a single nestable task from the |queue|. On exit, |out_task| will 196 // Runs a single nestable task from the |queue|. On exit, |out_task| will
197 // contain the task which was executed. Non-nestable task are reposted on the 197 // contain the task which was executed. Non-nestable task are reposted on the
198 // run loop. The queue must not be empty. On exit |time_after_task| may get 198 // run loop. The queue must not be empty. On exit |time_after_task| may get
199 // set (not guaranteed), sampling |real_time_domain()->Now()| immediately 199 // set (not guaranteed), sampling |real_time_domain()->Now()| immediately
200 // after running the task. 200 // after running the task.
201 ProcessTaskResult ProcessTaskFromWorkQueue(internal::WorkQueue* work_queue, 201 ProcessTaskResult ProcessTaskFromWorkQueue(internal::WorkQueue* work_queue,
202 bool is_nested,
202 LazyNow time_before_task, 203 LazyNow time_before_task,
203 base::TimeTicks* time_after_task); 204 base::TimeTicks* time_after_task);
204 205
205 bool RunsTasksOnCurrentThread() const; 206 bool RunsTasksOnCurrentThread() const;
206 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 207 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
207 const base::Closure& task, 208 const base::Closure& task,
208 base::TimeDelta delay); 209 base::TimeDelta delay);
209 210
210 internal::EnqueueOrder GetNextSequenceNumber(); 211 internal::EnqueueOrder GetNextSequenceNumber();
211 212
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 scoped_refptr<DeletionSentinel> deletion_sentinel_; 270 scoped_refptr<DeletionSentinel> deletion_sentinel_;
270 base::WeakPtrFactory<TaskQueueManager> weak_factory_; 271 base::WeakPtrFactory<TaskQueueManager> weak_factory_;
271 272
272 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager); 273 DISALLOW_COPY_AND_ASSIGN(TaskQueueManager);
273 }; 274 };
274 275
275 } // namespace scheduler 276 } // namespace scheduler
276 } // namespace blink 277 } // namespace blink
277 278
278 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_ H_ 279 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_ H_
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698