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

Side by Side Diff: cc/scheduler/delay_based_time_source.h

Issue 267783004: Refactoring the way begin frame sources inside scheduler work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing as per Brian's comments. Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ 5 #ifndef CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
6 #define CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ 6 #define CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 24 matching lines...) Expand all
35 : public base::RefCounted<DelayBasedTimeSource> { 35 : public base::RefCounted<DelayBasedTimeSource> {
36 public: 36 public:
37 static scoped_refptr<DelayBasedTimeSource> Create( 37 static scoped_refptr<DelayBasedTimeSource> Create(
38 base::TimeDelta interval, base::SingleThreadTaskRunner* task_runner); 38 base::TimeDelta interval, base::SingleThreadTaskRunner* task_runner);
39 39
40 virtual void SetClient(TimeSourceClient* client); 40 virtual void SetClient(TimeSourceClient* client);
41 41
42 // TimeSource implementation 42 // TimeSource implementation
43 virtual void SetTimebaseAndInterval(base::TimeTicks timebase, 43 virtual void SetTimebaseAndInterval(base::TimeTicks timebase,
44 base::TimeDelta interval); 44 base::TimeDelta interval);
45 base::TimeDelta Interval() const { return next_parameters_.interval; }
45 46
46 virtual base::TimeTicks SetActive(bool active); 47 virtual base::TimeTicks SetActive(bool active);
47 virtual bool Active() const; 48 virtual bool Active() const;
48 49
49 // Get the last and next tick times. NextTickTime() returns null when 50 // Get the last and next tick times. NextTickTime() returns null when
50 // inactive. 51 // inactive.
51 virtual base::TimeTicks LastTickTime() const; 52 virtual base::TimeTicks LastTickTime() const;
52 virtual base::TimeTicks NextTickTime() const; 53 virtual base::TimeTicks NextTickTime() const;
53 54
54 // Virtual for testing. 55 // Virtual for testing.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 110
110 virtual std::string TypeString() const OVERRIDE; 111 virtual std::string TypeString() const OVERRIDE;
111 112
112 private: 113 private:
113 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSourceHighRes); 114 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSourceHighRes);
114 }; 115 };
115 116
116 } // namespace cc 117 } // namespace cc
117 118
118 #endif // CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ 119 #endif // CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/scheduler/frame_source.h » ('j') | cc/scheduler/frame_source.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698