| Index: content/renderer/scheduler/task_queue_manager.h
|
| diff --git a/content/renderer/scheduler/task_queue_manager.h b/content/renderer/scheduler/task_queue_manager.h
|
| index 100c6d570ca173b44587af4712cbeadcac30d860..f6aca7894a0d7410cfbb5c30e5fef8c55a21246e 100644
|
| --- a/content/renderer/scheduler/task_queue_manager.h
|
| +++ b/content/renderer/scheduler/task_queue_manager.h
|
| @@ -80,6 +80,12 @@ class CONTENT_EXPORT TaskQueueManager {
|
| // to a static string.
|
| void SetQueueName(size_t queue_index, const char* name);
|
|
|
| + // Set the number of tasks executed in a single invocation of the task queue
|
| + // manager. Increasing the batch size can reduce the overhead of yielding
|
| + // back to the main message loop -- at the cost of potentially delaying other
|
| + // tasks posted to the main loop. The batch size is 1 by default.
|
| + void SetWorkBatchSize(int work_batch_size);
|
| +
|
| private:
|
| friend class internal::TaskQueue;
|
|
|
| @@ -135,6 +141,8 @@ class CONTENT_EXPORT TaskQueueManager {
|
| // where re-entrant problems happen.
|
| int pending_dowork_count_;
|
|
|
| + int work_batch_size_;
|
| +
|
| base::WeakPtrFactory<TaskQueueManager> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TaskQueueManager);
|
|
|