Chromium Code Reviews| 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 <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 virtual DrawResult ScheduledActionDrawIfPossible() = 0; | 41 virtual DrawResult ScheduledActionDrawIfPossible() = 0; |
| 42 virtual DrawResult ScheduledActionDrawForced() = 0; | 42 virtual DrawResult ScheduledActionDrawForced() = 0; |
| 43 virtual void ScheduledActionCommit() = 0; | 43 virtual void ScheduledActionCommit() = 0; |
| 44 virtual void ScheduledActionActivateSyncTree() = 0; | 44 virtual void ScheduledActionActivateSyncTree() = 0; |
| 45 virtual void ScheduledActionBeginCompositorFrameSinkCreation() = 0; | 45 virtual void ScheduledActionBeginCompositorFrameSinkCreation() = 0; |
| 46 virtual void ScheduledActionPrepareTiles() = 0; | 46 virtual void ScheduledActionPrepareTiles() = 0; |
| 47 virtual void ScheduledActionInvalidateCompositorFrameSink() = 0; | 47 virtual void ScheduledActionInvalidateCompositorFrameSink() = 0; |
| 48 virtual void ScheduledActionPerformImplSideInvalidation() = 0; | 48 virtual void ScheduledActionPerformImplSideInvalidation() = 0; |
| 49 virtual void DidFinishImplFrame() = 0; | 49 virtual void DidFinishImplFrame() = 0; |
| 50 virtual void SendBeginMainFrameNotExpectedSoon() = 0; | 50 virtual void SendBeginMainFrameNotExpectedSoon() = 0; |
| 51 virtual void ScheduledActionBeginMainFrameNotExpectedUntil( | |
| 52 base::TimeTicks frameTime) = 0; | |
|
Sami
2017/04/06 17:39:09
nit: frame_time (or just time)
Dan Elphick
2017/04/07 09:05:02
Thanks thought I'd got them all.
Done.
| |
| 51 | 53 |
| 52 protected: | 54 protected: |
| 53 virtual ~SchedulerClient() {} | 55 virtual ~SchedulerClient() {} |
| 54 }; | 56 }; |
| 55 | 57 |
| 56 class CC_EXPORT Scheduler : public BeginFrameObserverBase { | 58 class CC_EXPORT Scheduler : public BeginFrameObserverBase { |
| 57 public: | 59 public: |
| 58 Scheduler(SchedulerClient* client, | 60 Scheduler(SchedulerClient* client, |
| 59 const SchedulerSettings& scheduler_settings, | 61 const SchedulerSettings& scheduler_settings, |
| 60 int layer_tree_host_id, | 62 int layer_tree_host_id, |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 SchedulerStateMachine state_machine_; | 184 SchedulerStateMachine state_machine_; |
| 183 bool inside_process_scheduled_actions_; | 185 bool inside_process_scheduled_actions_; |
| 184 SchedulerStateMachine::Action inside_action_; | 186 SchedulerStateMachine::Action inside_action_; |
| 185 | 187 |
| 186 bool stopped_; | 188 bool stopped_; |
| 187 | 189 |
| 188 private: | 190 private: |
| 189 void ScheduleBeginImplFrameDeadline(); | 191 void ScheduleBeginImplFrameDeadline(); |
| 190 void ScheduleBeginImplFrameDeadlineIfNeeded(); | 192 void ScheduleBeginImplFrameDeadlineIfNeeded(); |
| 191 void BeginImplFrameNotExpectedSoon(); | 193 void BeginImplFrameNotExpectedSoon(); |
| 194 void BeginMainFrameNotExpectedUntil(base::TimeTicks time); | |
| 192 void SetupNextBeginFrameIfNeeded(); | 195 void SetupNextBeginFrameIfNeeded(); |
| 193 void DrawIfPossible(); | 196 void DrawIfPossible(); |
| 194 void DrawForced(); | 197 void DrawForced(); |
| 195 void ProcessScheduledActions(); | 198 void ProcessScheduledActions(); |
| 196 void UpdateCompositorTimingHistoryRecordingEnabled(); | 199 void UpdateCompositorTimingHistoryRecordingEnabled(); |
| 197 bool ShouldRecoverMainLatency(const BeginFrameArgs& args, | 200 bool ShouldRecoverMainLatency(const BeginFrameArgs& args, |
| 198 bool can_activate_before_deadline) const; | 201 bool can_activate_before_deadline) const; |
| 199 bool ShouldRecoverImplLatency(const BeginFrameArgs& args, | 202 bool ShouldRecoverImplLatency(const BeginFrameArgs& args, |
| 200 bool can_activate_before_deadline) const; | 203 bool can_activate_before_deadline) const; |
| 201 bool CanBeginMainFrameAndActivateBeforeDeadline( | 204 bool CanBeginMainFrameAndActivateBeforeDeadline( |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 218 } | 221 } |
| 219 | 222 |
| 220 base::WeakPtrFactory<Scheduler> weak_factory_; | 223 base::WeakPtrFactory<Scheduler> weak_factory_; |
| 221 | 224 |
| 222 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 225 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
| 223 }; | 226 }; |
| 224 | 227 |
| 225 } // namespace cc | 228 } // namespace cc |
| 226 | 229 |
| 227 #endif // CC_SCHEDULER_SCHEDULER_H_ | 230 #endif // CC_SCHEDULER_SCHEDULER_H_ |
| OLD | NEW |