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

Unified Diff: cc/scheduler/delay_based_time_source.h

Issue 25819002: Revert 210101 "cc: Fix and simplify DelayBasedTimeSource" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1599_59/src/
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | cc/scheduler/delay_based_time_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/delay_based_time_source.h
===================================================================
--- cc/scheduler/delay_based_time_source.h (revision 226616)
+++ cc/scheduler/delay_based_time_source.h (working copy)
@@ -47,6 +47,12 @@
void PostNextTickTask(base::TimeTicks now);
void OnTimerFired();
+ enum State {
+ STATE_INACTIVE,
+ STATE_STARTING,
+ STATE_ACTIVE,
+ };
+
struct Parameters {
Parameters(base::TimeDelta interval, base::TimeTicks tick_target)
: interval(interval), tick_target(tick_target) {}
@@ -55,6 +61,7 @@
};
TimeSourceClient* client_;
+ bool has_tick_target_;
base::TimeTicks last_tick_time_;
// current_parameters_ should only be written by PostNextTickTask.
@@ -64,7 +71,7 @@
Parameters current_parameters_;
Parameters next_parameters_;
- bool active_;
+ State state_;
base::SingleThreadTaskRunner* task_runner_;
base::WeakPtrFactory<DelayBasedTimeSource> weak_factory_;
« no previous file with comments | « no previous file | cc/scheduler/delay_based_time_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698