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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 base::TimeTicks AnticipatedDrawTime() const; | 107 base::TimeTicks AnticipatedDrawTime() const; |
108 | 108 |
109 void NotifyBeginMainFrameStarted(); | 109 void NotifyBeginMainFrameStarted(); |
110 | 110 |
111 base::TimeTicks LastBeginImplFrameTime(); | 111 base::TimeTicks LastBeginImplFrameTime(); |
112 | 112 |
113 void BeginImplFrame(const BeginFrameArgs& args); | 113 void BeginImplFrame(const BeginFrameArgs& args); |
114 void OnBeginImplFrameDeadline(); | 114 void OnBeginImplFrameDeadline(); |
115 void PollForAnticipatedDrawTriggers(); | 115 void PollForAnticipatedDrawTriggers(); |
| 116 void PollToAdvanceCommitState(); |
116 | 117 |
117 scoped_ptr<base::Value> StateAsValue() const; | 118 scoped_ptr<base::Value> StateAsValue() const; |
118 | 119 |
119 bool IsInsideAction(SchedulerStateMachine::Action action) { | 120 bool IsInsideAction(SchedulerStateMachine::Action action) { |
120 return inside_action_ == action; | 121 return inside_action_ == action; |
121 } | 122 } |
122 | 123 |
123 bool IsBeginMainFrameSent() const; | 124 bool IsBeginMainFrameSent() const; |
124 | 125 |
125 private: | 126 private: |
(...skipping 18 matching lines...) Expand all Loading... |
144 | 145 |
145 const SchedulerSettings settings_; | 146 const SchedulerSettings settings_; |
146 SchedulerClient* client_; | 147 SchedulerClient* client_; |
147 int layer_tree_host_id_; | 148 int layer_tree_host_id_; |
148 scoped_refptr<base::SequencedTaskRunner> impl_task_runner_; | 149 scoped_refptr<base::SequencedTaskRunner> impl_task_runner_; |
149 | 150 |
150 bool last_set_needs_begin_impl_frame_; | 151 bool last_set_needs_begin_impl_frame_; |
151 BeginFrameArgs last_begin_impl_frame_args_; | 152 BeginFrameArgs last_begin_impl_frame_args_; |
152 base::CancelableClosure begin_impl_frame_deadline_closure_; | 153 base::CancelableClosure begin_impl_frame_deadline_closure_; |
153 base::CancelableClosure poll_for_draw_triggers_closure_; | 154 base::CancelableClosure poll_for_draw_triggers_closure_; |
154 base::RepeatingTimer<Scheduler> advance_commit_state_timer_; | 155 base::CancelableClosure advance_commit_state_closure_; |
155 | 156 |
156 SchedulerStateMachine state_machine_; | 157 SchedulerStateMachine state_machine_; |
157 bool inside_process_scheduled_actions_; | 158 bool inside_process_scheduled_actions_; |
158 SchedulerStateMachine::Action inside_action_; | 159 SchedulerStateMachine::Action inside_action_; |
159 | 160 |
160 base::WeakPtrFactory<Scheduler> weak_factory_; | 161 base::WeakPtrFactory<Scheduler> weak_factory_; |
161 | 162 |
162 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 163 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
163 }; | 164 }; |
164 | 165 |
165 } // namespace cc | 166 } // namespace cc |
166 | 167 |
167 #endif // CC_SCHEDULER_SCHEDULER_H_ | 168 #endif // CC_SCHEDULER_SCHEDULER_H_ |
OLD | NEW |