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

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

Issue 2778123003: [scheduler] Add WakeupBudgetPool. (Closed)
Patch Set: Addressed comments from alexclarke@ Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.h
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.h b/third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.h
index 53b4514b39fc780e67c4c0e56518ece97b41fa16..c187c1e911850c1c6aa039eea43d2d167b432c37 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.h
@@ -18,6 +18,8 @@ class BLINK_PLATFORM_EXPORT ThrottledTimeDomain : public RealTimeDomain {
ThrottledTimeDomain(const char* tracing_category);
~ThrottledTimeDomain() override;
+ void SetNextTaskRunTime(base::TimeTicks run_time);
+
// TimeDomain implementation:
const char* GetName() const override;
void RequestWakeUpAt(base::TimeTicks now, base::TimeTicks run_time) override;
@@ -27,6 +29,10 @@ class BLINK_PLATFORM_EXPORT ThrottledTimeDomain : public RealTimeDomain {
using TimeDomain::WakeUpReadyDelayedQueues;
private:
+ // Next task run time provided by task queue throttler. Note that it does not
+ // get reset, so it is valid only when in the future.
+ base::Optional<base::TimeTicks> next_task_;
+
DISALLOW_COPY_AND_ASSIGN(ThrottledTimeDomain);
};

Powered by Google App Engine
This is Rietveld 408576698