OLD | NEW |
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_SCHEDULER_H_ | 5 #ifndef CC_SCHEDULER_SCHEDULER_H_ |
6 #define CC_SCHEDULER_SCHEDULER_H_ | 6 #define CC_SCHEDULER_SCHEDULER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 bool RedrawPending() const { return state_machine_.RedrawPending(); } | 97 bool RedrawPending() const { return state_machine_.RedrawPending(); } |
98 | 98 |
99 void SetTimebaseAndInterval(base::TimeTicks timebase, | 99 void SetTimebaseAndInterval(base::TimeTicks timebase, |
100 base::TimeDelta interval); | 100 base::TimeDelta interval); |
101 | 101 |
102 base::TimeTicks AnticipatedDrawTime(); | 102 base::TimeTicks AnticipatedDrawTime(); |
103 | 103 |
104 base::TimeTicks LastVSyncTime(); | 104 base::TimeTicks LastVSyncTime(); |
105 | 105 |
106 // FrameRateControllerClient implementation | 106 // FrameRateControllerClient implementation |
107 virtual void vsyncTick(bool throttled) OVERRIDE; | 107 virtual void VSyncTick(bool throttled) OVERRIDE; |
108 | 108 |
109 private: | 109 private: |
110 Scheduler(SchedulerClient* client, | 110 Scheduler(SchedulerClient* client, |
111 scoped_ptr<FrameRateController> frame_rate_controller, | 111 scoped_ptr<FrameRateController> frame_rate_controller, |
112 const SchedulerSettings& scheduler_settings); | 112 const SchedulerSettings& scheduler_settings); |
113 | 113 |
114 void ProcessScheduledActions(); | 114 void ProcessScheduledActions(); |
115 | 115 |
116 const SchedulerSettings settings_; | 116 const SchedulerSettings settings_; |
117 SchedulerClient* client_; | 117 SchedulerClient* client_; |
118 scoped_ptr<FrameRateController> frame_rate_controller_; | 118 scoped_ptr<FrameRateController> frame_rate_controller_; |
119 SchedulerStateMachine state_machine_; | 119 SchedulerStateMachine state_machine_; |
120 bool inside_process_scheduled_actions_; | 120 bool inside_process_scheduled_actions_; |
121 | 121 |
122 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 122 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
123 }; | 123 }; |
124 | 124 |
125 } // namespace cc | 125 } // namespace cc |
126 | 126 |
127 #endif // CC_SCHEDULER_SCHEDULER_H_ | 127 #endif // CC_SCHEDULER_SCHEDULER_H_ |
OLD | NEW |