| 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 13 matching lines...) Expand all Loading... |
| 24 class Thread; | 24 class Thread; |
| 25 | 25 |
| 26 class SchedulerClient { | 26 class SchedulerClient { |
| 27 public: | 27 public: |
| 28 virtual void SetNeedsBeginFrame(bool enable) = 0; | 28 virtual void SetNeedsBeginFrame(bool enable) = 0; |
| 29 virtual void WillBeginImplFrame(const BeginFrameArgs& args) = 0; | 29 virtual void WillBeginImplFrame(const BeginFrameArgs& args) = 0; |
| 30 virtual void ScheduledActionSendBeginMainFrame() = 0; | 30 virtual void ScheduledActionSendBeginMainFrame() = 0; |
| 31 virtual DrawSwapReadbackResult ScheduledActionDrawAndSwapIfPossible() = 0; | 31 virtual DrawSwapReadbackResult ScheduledActionDrawAndSwapIfPossible() = 0; |
| 32 virtual DrawSwapReadbackResult ScheduledActionDrawAndSwapForced() = 0; | 32 virtual DrawSwapReadbackResult ScheduledActionDrawAndSwapForced() = 0; |
| 33 virtual DrawSwapReadbackResult ScheduledActionDrawAndReadback() = 0; | 33 virtual DrawSwapReadbackResult ScheduledActionDrawAndReadback() = 0; |
| 34 virtual void ScheduledActionAnimate() = 0; |
| 34 virtual void ScheduledActionCommit() = 0; | 35 virtual void ScheduledActionCommit() = 0; |
| 35 virtual void ScheduledActionUpdateVisibleTiles() = 0; | 36 virtual void ScheduledActionUpdateVisibleTiles() = 0; |
| 36 virtual void ScheduledActionActivatePendingTree() = 0; | 37 virtual void ScheduledActionActivatePendingTree() = 0; |
| 37 virtual void ScheduledActionBeginOutputSurfaceCreation() = 0; | 38 virtual void ScheduledActionBeginOutputSurfaceCreation() = 0; |
| 38 virtual void ScheduledActionManageTiles() = 0; | 39 virtual void ScheduledActionManageTiles() = 0; |
| 39 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) = 0; | 40 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) = 0; |
| 40 virtual base::TimeDelta DrawDurationEstimate() = 0; | 41 virtual base::TimeDelta DrawDurationEstimate() = 0; |
| 41 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() = 0; | 42 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() = 0; |
| 42 virtual base::TimeDelta CommitToActivateDurationEstimate() = 0; | 43 virtual base::TimeDelta CommitToActivateDurationEstimate() = 0; |
| 43 virtual void DidBeginImplFrameDeadline() = 0; | 44 virtual void DidBeginImplFrameDeadline() = 0; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 66 void NotifyReadyToActivate(); | 67 void NotifyReadyToActivate(); |
| 67 | 68 |
| 68 void SetNeedsCommit(); | 69 void SetNeedsCommit(); |
| 69 | 70 |
| 70 // Like SetNeedsCommit(), but ensures a commit will definitely happen even if | 71 // Like SetNeedsCommit(), but ensures a commit will definitely happen even if |
| 71 // we are not visible. Will eventually result in a forced draw internally. | 72 // we are not visible. Will eventually result in a forced draw internally. |
| 72 void SetNeedsForcedCommitForReadback(); | 73 void SetNeedsForcedCommitForReadback(); |
| 73 | 74 |
| 74 void SetNeedsRedraw(); | 75 void SetNeedsRedraw(); |
| 75 | 76 |
| 77 void SetNeedsAnimate(); |
| 78 |
| 76 void SetNeedsManageTiles(); | 79 void SetNeedsManageTiles(); |
| 77 | 80 |
| 78 void SetSwapUsedIncompleteTile(bool used_incomplete_tile); | 81 void SetSwapUsedIncompleteTile(bool used_incomplete_tile); |
| 79 | 82 |
| 80 void SetSmoothnessTakesPriority(bool smoothness_takes_priority); | 83 void SetSmoothnessTakesPriority(bool smoothness_takes_priority); |
| 81 | 84 |
| 82 void NotifyReadyToCommit(); | 85 void NotifyReadyToCommit(); |
| 83 void BeginMainFrameAborted(bool did_handle); | 86 void BeginMainFrameAborted(bool did_handle); |
| 84 | 87 |
| 85 void DidManageTiles(); | 88 void DidManageTiles(); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 SchedulerStateMachine::Action inside_action_; | 177 SchedulerStateMachine::Action inside_action_; |
| 175 | 178 |
| 176 base::WeakPtrFactory<Scheduler> weak_factory_; | 179 base::WeakPtrFactory<Scheduler> weak_factory_; |
| 177 | 180 |
| 178 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 181 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
| 179 }; | 182 }; |
| 180 | 183 |
| 181 } // namespace cc | 184 } // namespace cc |
| 182 | 185 |
| 183 #endif // CC_SCHEDULER_SCHEDULER_H_ | 186 #endif // CC_SCHEDULER_SCHEDULER_H_ |
| OLD | NEW |