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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h

Issue 2896603002: [scheduler] Move task alignment into WakeUpBudgetPool. (Closed)
Patch Set: no iostream 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_RENDERER_TASK_QUEUE_THROTTL ER_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_TASK_QUEUE_THROTTL ER_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_TASK_QUEUE_THROTTL ER_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_TASK_QUEUE_THROTTL ER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <unordered_map> 9 #include <unordered_map>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Disable throttling for all queues, this setting takes precedence over 125 // Disable throttling for all queues, this setting takes precedence over
126 // all other throttling settings. Designed to be used when a global event 126 // all other throttling settings. Designed to be used when a global event
127 // disabling throttling happens (e.g. audio is playing). 127 // disabling throttling happens (e.g. audio is playing).
128 void DisableThrottling(); 128 void DisableThrottling();
129 129
130 // Enable back global throttling. 130 // Enable back global throttling.
131 void EnableThrottling(); 131 void EnableThrottling();
132 132
133 const ThrottledTimeDomain* time_domain() const { return time_domain_.get(); } 133 const ThrottledTimeDomain* time_domain() const { return time_domain_.get(); }
134 134
135 // TODO(altimin): Remove it.
Z_DONOTUSE 2017/05/23 19:31:46 In the future, please give more descriptive TODOs.
135 static base::TimeTicks AlignedThrottledRunTime( 136 static base::TimeTicks AlignedThrottledRunTime(
136 base::TimeTicks unthrottled_runtime); 137 base::TimeTicks unthrottled_runtime);
137 138
138 const scoped_refptr<TaskQueue>& task_queue() const { 139 const scoped_refptr<TaskQueue>& task_queue() const {
139 return control_task_queue_; 140 return control_task_queue_;
140 } 141 }
141 142
142 // Returned object is owned by |TaskQueueThrottler|. 143 // Returned object is owned by |TaskQueueThrottler|.
143 CPUTimeBudgetPool* CreateCPUTimeBudgetPool(const char* name); 144 CPUTimeBudgetPool* CreateCPUTimeBudgetPool(const char* name);
144 WakeUpBudgetPool* CreateWakeUpBudgetPool(const char* name); 145 WakeUpBudgetPool* CreateWakeUpBudgetPool(const char* name);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 203
203 base::WeakPtrFactory<TaskQueueThrottler> weak_factory_; 204 base::WeakPtrFactory<TaskQueueThrottler> weak_factory_;
204 205
205 DISALLOW_COPY_AND_ASSIGN(TaskQueueThrottler); 206 DISALLOW_COPY_AND_ASSIGN(TaskQueueThrottler);
206 }; 207 };
207 208
208 } // namespace scheduler 209 } // namespace scheduler
209 } // namespace blink 210 } // namespace blink
210 211
211 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_TASK_QUEUE_THRO TTLER_H_ 212 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_TASK_QUEUE_THRO TTLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698