| 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_STATE_MACHINE_H_ | 5 #ifndef CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| 6 #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 6 #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 void SetVisible(bool visible); | 103 void SetVisible(bool visible); |
| 104 | 104 |
| 105 // Indicates that a redraw is required, either due to the impl tree changing | 105 // Indicates that a redraw is required, either due to the impl tree changing |
| 106 // or the screen being damaged and simply needing redisplay. | 106 // or the screen being damaged and simply needing redisplay. |
| 107 void SetNeedsRedraw(); | 107 void SetNeedsRedraw(); |
| 108 | 108 |
| 109 // As SetNeedsRedraw(), but ensures the draw will definitely happen even if | 109 // As SetNeedsRedraw(), but ensures the draw will definitely happen even if |
| 110 // we are not visible. | 110 // we are not visible. |
| 111 void SetNeedsForcedRedraw(); | 111 void SetNeedsForcedRedraw(); |
| 112 | 112 |
| 113 // Indicates that a redraw is required because we are currently rendering | 113 // Indicates whether a redraw is required because we are currently rendering |
| 114 // with a low resolution or checkerboarded tile. | 114 // with a low resolution or checkerboarded tile. |
| 115 void DidSwapUseIncompleteTile(); | 115 void SetSwapUsedIncompleteTile(bool used_incomplete_tile); |
| 116 | 116 |
| 117 // Indicates whether ACTION_DRAW_IF_POSSIBLE drew to the screen or not. | 117 // Indicates whether ACTION_DRAW_IF_POSSIBLE drew to the screen or not. |
| 118 void DidDrawIfPossibleCompleted(bool success); | 118 void DidDrawIfPossibleCompleted(bool success); |
| 119 | 119 |
| 120 // Indicates that a new commit flow needs to be performed, either to pull | 120 // Indicates that a new commit flow needs to be performed, either to pull |
| 121 // updates from the main thread to the impl, or to push deltas from the impl | 121 // updates from the main thread to the impl, or to push deltas from the impl |
| 122 // thread to main. | 122 // thread to main. |
| 123 void SetNeedsCommit(); | 123 void SetNeedsCommit(); |
| 124 | 124 |
| 125 // As SetNeedsCommit(), but ensures the begin frame will be sent to the main | 125 // As SetNeedsCommit(), but ensures the begin frame will be sent to the main |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 bool ShouldSendBeginFrameToMainThread() const; | 181 bool ShouldSendBeginFrameToMainThread() const; |
| 182 bool ShouldCommit() const; | 182 bool ShouldCommit() const; |
| 183 | 183 |
| 184 bool HasDrawnThisFrame() const; | 184 bool HasDrawnThisFrame() const; |
| 185 bool HasActivatedPendingTreeThisFrame() const; | 185 bool HasActivatedPendingTreeThisFrame() const; |
| 186 bool HasUpdatedVisibleTilesThisFrame() const; | 186 bool HasUpdatedVisibleTilesThisFrame() const; |
| 187 bool HasSentBeginFrameToMainThreadThisFrame() const; | 187 bool HasSentBeginFrameToMainThreadThisFrame() const; |
| 188 | 188 |
| 189 void UpdateStateOnCommit(bool commit_was_aborted); | 189 void UpdateStateOnCommit(bool commit_was_aborted); |
| 190 void UpdateStateOnActivation(); | 190 void UpdateStateOnActivation(); |
| 191 void UpdateStateOnDraw(bool did_swap); | 191 void UpdateStateOnDraw(); |
| 192 | 192 |
| 193 const SchedulerSettings settings_; | 193 const SchedulerSettings settings_; |
| 194 | 194 |
| 195 OutputSurfaceState output_surface_state_; | 195 OutputSurfaceState output_surface_state_; |
| 196 CommitState commit_state_; | 196 CommitState commit_state_; |
| 197 | 197 |
| 198 int commit_count_; | 198 int commit_count_; |
| 199 int current_frame_number_; | 199 int current_frame_number_; |
| 200 int last_frame_number_where_begin_frame_sent_to_main_thread_; | 200 int last_frame_number_where_begin_frame_sent_to_main_thread_; |
| 201 int last_frame_number_where_draw_was_called_; | 201 int last_frame_number_where_draw_was_called_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 222 TextureState texture_state_; | 222 TextureState texture_state_; |
| 223 bool did_create_and_initialize_first_output_surface_; | 223 bool did_create_and_initialize_first_output_surface_; |
| 224 | 224 |
| 225 private: | 225 private: |
| 226 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 226 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 227 }; | 227 }; |
| 228 | 228 |
| 229 } // namespace cc | 229 } // namespace cc |
| 230 | 230 |
| 231 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 231 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| OLD | NEW |