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 ScheduledActionDoShortIdleWork(const BeginFrameArgs& args) = 0; | |
|
Sami
2017/03/24 15:24:10
I think my entry to the great bikeshedding race of
Dan Elphick
2017/03/29 16:02:44
Done.
| |
| 51 | 52 |
| 52 protected: | 53 protected: |
| 53 virtual ~SchedulerClient() {} | 54 virtual ~SchedulerClient() {} |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 class CC_EXPORT Scheduler : public BeginFrameObserverBase { | 57 class CC_EXPORT Scheduler : public BeginFrameObserverBase { |
| 57 public: | 58 public: |
| 58 Scheduler(SchedulerClient* client, | 59 Scheduler(SchedulerClient* client, |
| 59 const SchedulerSettings& scheduler_settings, | 60 const SchedulerSettings& scheduler_settings, |
| 60 int layer_tree_host_id, | 61 int layer_tree_host_id, |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 SchedulerStateMachine state_machine_; | 183 SchedulerStateMachine state_machine_; |
| 183 bool inside_process_scheduled_actions_; | 184 bool inside_process_scheduled_actions_; |
| 184 SchedulerStateMachine::Action inside_action_; | 185 SchedulerStateMachine::Action inside_action_; |
| 185 | 186 |
| 186 bool stopped_; | 187 bool stopped_; |
| 187 | 188 |
| 188 private: | 189 private: |
| 189 void ScheduleBeginImplFrameDeadline(); | 190 void ScheduleBeginImplFrameDeadline(); |
| 190 void ScheduleBeginImplFrameDeadlineIfNeeded(); | 191 void ScheduleBeginImplFrameDeadlineIfNeeded(); |
| 191 void BeginImplFrameNotExpectedSoon(); | 192 void BeginImplFrameNotExpectedSoon(); |
| 193 void ScheduleShortIdleWork(const BeginFrameArgs& args); | |
| 192 void SetupNextBeginFrameIfNeeded(); | 194 void SetupNextBeginFrameIfNeeded(); |
| 193 void DrawIfPossible(); | 195 void DrawIfPossible(); |
| 194 void DrawForced(); | 196 void DrawForced(); |
| 195 void ProcessScheduledActions(); | 197 void ProcessScheduledActions(); |
| 196 void UpdateCompositorTimingHistoryRecordingEnabled(); | 198 void UpdateCompositorTimingHistoryRecordingEnabled(); |
| 197 bool ShouldRecoverMainLatency(const BeginFrameArgs& args, | 199 bool ShouldRecoverMainLatency(const BeginFrameArgs& args, |
| 198 bool can_activate_before_deadline) const; | 200 bool can_activate_before_deadline) const; |
| 199 bool ShouldRecoverImplLatency(const BeginFrameArgs& args, | 201 bool ShouldRecoverImplLatency(const BeginFrameArgs& args, |
| 200 bool can_activate_before_deadline) const; | 202 bool can_activate_before_deadline) const; |
| 201 bool CanBeginMainFrameAndActivateBeforeDeadline( | 203 bool CanBeginMainFrameAndActivateBeforeDeadline( |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 218 } | 220 } |
| 219 | 221 |
| 220 base::WeakPtrFactory<Scheduler> weak_factory_; | 222 base::WeakPtrFactory<Scheduler> weak_factory_; |
| 221 | 223 |
| 222 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 224 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
| 223 }; | 225 }; |
| 224 | 226 |
| 225 } // namespace cc | 227 } // namespace cc |
| 226 | 228 |
| 227 #endif // CC_SCHEDULER_SCHEDULER_H_ | 229 #endif // CC_SCHEDULER_SCHEDULER_H_ |
| OLD | NEW |