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

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

Issue 2505693002: [scheduler] Initial budget for time-based throttling. (Closed)
Patch Set: Renamed SetTimeBudget to SetTimeBudgetRecoveryRate 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7e089a11bb383f7ec7c944ad12efeed8f04729c9..a1608bcf8022ff4f5c7332b18df266431c0451b9 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
@@ -56,7 +56,7 @@ class BLINK_PLATFORM_EXPORT TaskQueueThrottler : public TimeDomain::Observer {
// Throttle task queues from this time budget pool if tasks are running
// for more than |cpu_percentage| per cent of wall time.
// This function does not affect internal time budget level.
- void SetTimeBudget(base::TimeTicks now, double cpu_percentage);
+ void SetTimeBudgetRecoveryRate(base::TimeTicks now, double cpu_percentage);
// Adds |queue| to given pool. If the pool restriction does not allow
// a task to be run immediately and |queue| is throttled, |queue| becomes
@@ -83,6 +83,11 @@ class BLINK_PLATFORM_EXPORT TaskQueueThrottler : public TimeDomain::Observer {
bool IsThrottlingEnabled() const;
+ // Increase budget level by given value. This function DOES NOT unblock
+ // queues even if they are allowed to run with increased budget level.
+ void GrantAdditionalBudget(base::TimeTicks now,
+ base::TimeDelta budget_level);
+
const char* Name() const;
// Set callback which will be called every time when this budget pool
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698