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 <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 bool PrepareTilesPending() const { | 121 bool PrepareTilesPending() const { |
122 return state_machine_.PrepareTilesPending(); | 122 return state_machine_.PrepareTilesPending(); |
123 } | 123 } |
124 bool BeginImplFrameDeadlinePending() const { | 124 bool BeginImplFrameDeadlinePending() const { |
125 return !begin_impl_frame_deadline_task_.IsCancelled(); | 125 return !begin_impl_frame_deadline_task_.IsCancelled(); |
126 } | 126 } |
127 bool ImplLatencyTakesPriority() const { | 127 bool ImplLatencyTakesPriority() const { |
128 return state_machine_.impl_latency_takes_priority(); | 128 return state_machine_.impl_latency_takes_priority(); |
129 } | 129 } |
130 | 130 |
131 void NotifyBeginMainFrameStarted(); | 131 // Pass in a main_thread_start_time of base::TimeTicks() if it is not |
| 132 // known or not trustworthy (e.g. blink is running on a remote channel) |
| 133 // to signal that the start time isn't known and should not be used for |
| 134 // scheduling or statistics purposes. |
| 135 void NotifyBeginMainFrameStarted(base::TimeTicks main_thread_start_time); |
132 | 136 |
133 base::TimeTicks LastBeginImplFrameTime(); | 137 base::TimeTicks LastBeginImplFrameTime(); |
134 | 138 |
135 void SetDeferCommits(bool defer_commits); | 139 void SetDeferCommits(bool defer_commits); |
136 | 140 |
137 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; | 141 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; |
138 void AsValueInto(base::trace_event::TracedValue* value) const override; | 142 void AsValueInto(base::trace_event::TracedValue* value) const override; |
139 | 143 |
140 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); | 144 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); |
141 void SetVideoNeedsBeginFrames(bool video_needs_begin_frames); | 145 void SetVideoNeedsBeginFrames(bool video_needs_begin_frames); |
(...skipping 27 matching lines...) Expand all Loading... |
169 base::TimeDelta authoritative_vsync_interval_; | 173 base::TimeDelta authoritative_vsync_interval_; |
170 base::TimeTicks last_vsync_timebase_; | 174 base::TimeTicks last_vsync_timebase_; |
171 | 175 |
172 scoped_ptr<CompositorTimingHistory> compositor_timing_history_; | 176 scoped_ptr<CompositorTimingHistory> compositor_timing_history_; |
173 base::TimeDelta estimated_parent_draw_time_; | 177 base::TimeDelta estimated_parent_draw_time_; |
174 | 178 |
175 std::deque<BeginFrameArgs> begin_retro_frame_args_; | 179 std::deque<BeginFrameArgs> begin_retro_frame_args_; |
176 SchedulerStateMachine::BeginImplFrameDeadlineMode | 180 SchedulerStateMachine::BeginImplFrameDeadlineMode |
177 begin_impl_frame_deadline_mode_; | 181 begin_impl_frame_deadline_mode_; |
178 BeginFrameTracker begin_impl_frame_tracker_; | 182 BeginFrameTracker begin_impl_frame_tracker_; |
| 183 BeginFrameArgs begin_main_frame_args_; |
179 | 184 |
180 base::Closure begin_retro_frame_closure_; | 185 base::Closure begin_retro_frame_closure_; |
181 base::Closure begin_impl_frame_deadline_closure_; | 186 base::Closure begin_impl_frame_deadline_closure_; |
182 base::CancelableClosure begin_retro_frame_task_; | 187 base::CancelableClosure begin_retro_frame_task_; |
183 base::CancelableClosure begin_impl_frame_deadline_task_; | 188 base::CancelableClosure begin_impl_frame_deadline_task_; |
184 | 189 |
185 SchedulerStateMachine state_machine_; | 190 SchedulerStateMachine state_machine_; |
186 bool inside_process_scheduled_actions_; | 191 bool inside_process_scheduled_actions_; |
187 SchedulerStateMachine::Action inside_action_; | 192 SchedulerStateMachine::Action inside_action_; |
188 | 193 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 230 } |
226 | 231 |
227 base::WeakPtrFactory<Scheduler> weak_factory_; | 232 base::WeakPtrFactory<Scheduler> weak_factory_; |
228 | 233 |
229 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 234 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
230 }; | 235 }; |
231 | 236 |
232 } // namespace cc | 237 } // namespace cc |
233 | 238 |
234 #endif // CC_SCHEDULER_SCHEDULER_H_ | 239 #endif // CC_SCHEDULER_SCHEDULER_H_ |
OLD | NEW |