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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 bool CommitPending() const { return state_machine_.CommitPending(); } | 100 bool CommitPending() const { return state_machine_.CommitPending(); } |
101 bool RedrawPending() const { return state_machine_.RedrawPending(); } | 101 bool RedrawPending() const { return state_machine_.RedrawPending(); } |
102 | 102 |
103 bool WillDrawIfNeeded() const; | 103 bool WillDrawIfNeeded() const; |
104 | 104 |
105 void SetTimebaseAndInterval(base::TimeTicks timebase, | 105 void SetTimebaseAndInterval(base::TimeTicks timebase, |
106 base::TimeDelta interval); | 106 base::TimeDelta interval); |
107 | 107 |
108 base::TimeTicks AnticipatedDrawTime(); | 108 base::TimeTicks AnticipatedDrawTime(); |
109 | 109 |
110 base::TimeTicks LastVSyncTime(); | 110 base::TimeTicks LastBeginFrameTime(); |
111 | 111 |
112 // FrameRateControllerClient implementation | 112 // FrameRateControllerClient implementation |
113 virtual void VSyncTick(bool throttled) OVERRIDE; | 113 virtual void BeginFrame(bool throttled) OVERRIDE; |
114 | 114 |
115 private: | 115 private: |
116 Scheduler(SchedulerClient* client, | 116 Scheduler(SchedulerClient* client, |
117 scoped_ptr<FrameRateController> frame_rate_controller, | 117 scoped_ptr<FrameRateController> frame_rate_controller, |
118 const SchedulerSettings& scheduler_settings); | 118 const SchedulerSettings& scheduler_settings); |
119 | 119 |
120 void ProcessScheduledActions(); | 120 void ProcessScheduledActions(); |
121 | 121 |
122 const SchedulerSettings settings_; | 122 const SchedulerSettings settings_; |
123 SchedulerClient* client_; | 123 SchedulerClient* client_; |
124 scoped_ptr<FrameRateController> frame_rate_controller_; | 124 scoped_ptr<FrameRateController> frame_rate_controller_; |
125 SchedulerStateMachine state_machine_; | 125 SchedulerStateMachine state_machine_; |
126 bool inside_process_scheduled_actions_; | 126 bool inside_process_scheduled_actions_; |
127 | 127 |
128 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 128 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
129 }; | 129 }; |
130 | 130 |
131 } // namespace cc | 131 } // namespace cc |
132 | 132 |
133 #endif // CC_SCHEDULER_SCHEDULER_H_ | 133 #endif // CC_SCHEDULER_SCHEDULER_H_ |
OLD | NEW |