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

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

Issue 2483843002: Revert of [scheduler] Teach scheduler about audio state (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h b/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h
index 9829a6814ddcc48893c6dcc8c467824fcd31623a..42026cecc437852476cca84d507bb03a3f900d46 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h
@@ -178,13 +178,9 @@ class BLINK_PLATFORM_EXPORT TaskQueueThrottler : public TimeDomain::Observer {
// Returns true if the |task_queue| is throttled.
bool IsThrottled(TaskQueue* task_queue) const;
- // Disable throttling for all queues, this setting takes precedence over
- // all other throttling settings. Designed to be used when a global event
- // disabling throttling happens (e.g. audio is playing).
- void DisableThrottling();
-
- // Enable back global throttling.
- void EnableThrottling();
+ // Tells the TaskQueueThrottler we're using virtual time, which disables all
+ // throttling.
+ void EnableVirtualTime();
const ThrottledTimeDomain* time_domain() const { return time_domain_.get(); }
@@ -263,7 +259,7 @@ class BLINK_PLATFORM_EXPORT TaskQueueThrottler : public TimeDomain::Observer {
CancelableClosureHolder pump_throttled_tasks_closure_;
base::Optional<base::TimeTicks> pending_pump_throttled_tasks_runtime_;
- bool allow_throttling_;
+ bool virtual_time_;
std::unordered_map<TimeBudgetPool*, std::unique_ptr<TimeBudgetPool>>
time_budget_pools_;

Powered by Google App Engine
This is Rietveld 408576698