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

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

Issue 1432463002: cc: Track BeginMainFrame more precisely in CompositorTimingHistory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests. New tests to be added. Created 5 years, 1 month 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
« no previous file with comments | « cc/scheduler/compositor_timing_history_unittest.cc ('k') | cc/scheduler/scheduler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 bool PrepareTilesPending() const { 118 bool PrepareTilesPending() const {
119 return state_machine_.PrepareTilesPending(); 119 return state_machine_.PrepareTilesPending();
120 } 120 }
121 bool BeginImplFrameDeadlinePending() const { 121 bool BeginImplFrameDeadlinePending() const {
122 return !begin_impl_frame_deadline_task_.IsCancelled(); 122 return !begin_impl_frame_deadline_task_.IsCancelled();
123 } 123 }
124 bool ImplLatencyTakesPriority() const { 124 bool ImplLatencyTakesPriority() const {
125 return state_machine_.impl_latency_takes_priority(); 125 return state_machine_.impl_latency_takes_priority();
126 } 126 }
127 127
128 void NotifyBeginMainFrameStarted(); 128 // Pass in a main_thread_start_time of base::TimeTicks() if it is not
129 // known (e.g. blink lives on a remote machine) to signal that the
130 // start time isn't known and should not be used for scheduling
131 // and statistics puposes.
Sami 2015/11/05 14:42:36 nit: I'm not sure if the remote machine example is
brianderson 2015/11/05 21:33:26 With STP, we can still get valid timestamps. I che
Sami 2015/11/06 11:27:49 Ah right, looks like I misread STP as passing in a
132 void NotifyBeginMainFrameStarted(base::TimeTicks main_thread_start_time);
129 133
130 base::TimeTicks LastBeginImplFrameTime(); 134 base::TimeTicks LastBeginImplFrameTime();
131 135
132 void SetDeferCommits(bool defer_commits); 136 void SetDeferCommits(bool defer_commits);
133 137
134 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; 138 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
135 void AsValueInto(base::trace_event::TracedValue* value) const override; 139 void AsValueInto(base::trace_event::TracedValue* value) const override;
136 140
137 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); 141 void SetChildrenNeedBeginFrames(bool children_need_begin_frames);
138 void SetVideoNeedsBeginFrames(bool video_needs_begin_frames); 142 void SetVideoNeedsBeginFrames(bool video_needs_begin_frames);
(...skipping 27 matching lines...) Expand all
166 base::TimeDelta authoritative_vsync_interval_; 170 base::TimeDelta authoritative_vsync_interval_;
167 base::TimeTicks last_vsync_timebase_; 171 base::TimeTicks last_vsync_timebase_;
168 172
169 scoped_ptr<CompositorTimingHistory> compositor_timing_history_; 173 scoped_ptr<CompositorTimingHistory> compositor_timing_history_;
170 base::TimeDelta estimated_parent_draw_time_; 174 base::TimeDelta estimated_parent_draw_time_;
171 175
172 std::deque<BeginFrameArgs> begin_retro_frame_args_; 176 std::deque<BeginFrameArgs> begin_retro_frame_args_;
173 SchedulerStateMachine::BeginImplFrameDeadlineMode 177 SchedulerStateMachine::BeginImplFrameDeadlineMode
174 begin_impl_frame_deadline_mode_; 178 begin_impl_frame_deadline_mode_;
175 BeginFrameTracker begin_impl_frame_tracker_; 179 BeginFrameTracker begin_impl_frame_tracker_;
180 BeginFrameArgs begin_main_frame_args_;
176 181
177 base::Closure begin_retro_frame_closure_; 182 base::Closure begin_retro_frame_closure_;
178 base::Closure begin_impl_frame_deadline_closure_; 183 base::Closure begin_impl_frame_deadline_closure_;
179 base::CancelableClosure begin_retro_frame_task_; 184 base::CancelableClosure begin_retro_frame_task_;
180 base::CancelableClosure begin_impl_frame_deadline_task_; 185 base::CancelableClosure begin_impl_frame_deadline_task_;
181 186
182 SchedulerStateMachine state_machine_; 187 SchedulerStateMachine state_machine_;
183 bool inside_process_scheduled_actions_; 188 bool inside_process_scheduled_actions_;
184 SchedulerStateMachine::Action inside_action_; 189 SchedulerStateMachine::Action inside_action_;
185 190
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 227 }
223 228
224 base::WeakPtrFactory<Scheduler> weak_factory_; 229 base::WeakPtrFactory<Scheduler> weak_factory_;
225 230
226 DISALLOW_COPY_AND_ASSIGN(Scheduler); 231 DISALLOW_COPY_AND_ASSIGN(Scheduler);
227 }; 232 };
228 233
229 } // namespace cc 234 } // namespace cc
230 235
231 #endif // CC_SCHEDULER_SCHEDULER_H_ 236 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « cc/scheduler/compositor_timing_history_unittest.cc ('k') | cc/scheduler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698