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

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

Issue 1026233002: cc: Making BeginFrameSources support multiple BeginFrameObservers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 151
152 base::TimeTicks AnticipatedDrawTime() const; 152 base::TimeTicks AnticipatedDrawTime() const;
153 153
154 void NotifyBeginMainFrameStarted(); 154 void NotifyBeginMainFrameStarted();
155 155
156 base::TimeTicks LastBeginImplFrameTime(); 156 base::TimeTicks LastBeginImplFrameTime();
157 157
158 void SetDeferCommits(bool defer_commits); 158 void SetDeferCommits(bool defer_commits);
159 159
160 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; 160 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue();
161 void AsValueInto(base::trace_event::TracedValue* value) const override; 161 void AsValueInto(base::trace_event::TracedValue* value) override;
162 162
163 void SetContinuousPainting(bool continuous_painting) { 163 void SetContinuousPainting(bool continuous_painting) {
164 state_machine_.SetContinuousPainting(continuous_painting); 164 state_machine_.SetContinuousPainting(continuous_painting);
165 } 165 }
166 166
167 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); 167 void SetChildrenNeedBeginFrames(bool children_need_begin_frames);
168 168
169 protected: 169 protected:
170 Scheduler(SchedulerClient* client, 170 Scheduler(SchedulerClient* client,
171 const SchedulerSettings& scheduler_settings, 171 const SchedulerSettings& scheduler_settings,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 SchedulerStateMachine::Action inside_action_; 217 SchedulerStateMachine::Action inside_action_;
218 218
219 private: 219 private:
220 void ScheduleBeginImplFrameDeadline(); 220 void ScheduleBeginImplFrameDeadline();
221 void RescheduleBeginImplFrameDeadlineIfNeeded(); 221 void RescheduleBeginImplFrameDeadlineIfNeeded();
222 void SetupNextBeginFrameIfNeeded(); 222 void SetupNextBeginFrameIfNeeded();
223 void PostBeginRetroFrameIfNeeded(); 223 void PostBeginRetroFrameIfNeeded();
224 void SetupPollingMechanisms(); 224 void SetupPollingMechanisms();
225 void DrawAndSwapIfPossible(); 225 void DrawAndSwapIfPossible();
226 void ProcessScheduledActions(); 226 void ProcessScheduledActions();
227 bool CanCommitAndActivateBeforeDeadline() const; 227 bool CanCommitAndActivateBeforeDeadline();
228 void AdvanceCommitStateIfPossible(); 228 void AdvanceCommitStateIfPossible();
229 bool IsBeginMainFrameSentOrStarted() const; 229 bool IsBeginMainFrameSentOrStarted() const;
230 void BeginRetroFrame(); 230 void BeginRetroFrame();
231 void BeginImplFrame(const BeginFrameArgs& args); 231 void BeginImplFrame(const BeginFrameArgs& args);
232 void OnBeginImplFrameDeadline(); 232 void OnBeginImplFrameDeadline();
233 void PollForAnticipatedDrawTriggers(); 233 void PollForAnticipatedDrawTriggers();
234 void PollToAdvanceCommitState(); 234 void PollToAdvanceCommitState();
235 void UpdateActiveFrameSource(); 235 void UpdateActiveFrameSource();
236 236
237 base::TimeDelta EstimatedParentDrawTime() { 237 base::TimeDelta EstimatedParentDrawTime() {
238 return estimated_parent_draw_time_; 238 return estimated_parent_draw_time_;
239 } 239 }
240 240
241 bool IsInsideAction(SchedulerStateMachine::Action action) { 241 bool IsInsideAction(SchedulerStateMachine::Action action) {
242 return inside_action_ == action; 242 return inside_action_ == action;
243 } 243 }
244 244
245 base::WeakPtrFactory<Scheduler> weak_factory_; 245 base::WeakPtrFactory<Scheduler> weak_factory_;
246 246
247 friend class SchedulerFrameSourcesConstructor; 247 friend class SchedulerFrameSourcesConstructor;
248 friend class TestSchedulerFrameSourcesConstructor; 248 friend class TestSchedulerFrameSourcesConstructor;
249 249
250 DISALLOW_COPY_AND_ASSIGN(Scheduler); 250 DISALLOW_COPY_AND_ASSIGN(Scheduler);
251 }; 251 };
252 252
253 } // namespace cc 253 } // namespace cc
254 254
255 #endif // CC_SCHEDULER_SCHEDULER_H_ 255 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698