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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 // begin frame to finish. | 113 // begin frame to finish. |
114 void SetNeedsForcedCommit(); | 114 void SetNeedsForcedCommit(); |
115 | 115 |
116 // Call this only in response to receiving an | 116 // Call this only in response to receiving an |
117 // ACTION_SEND_BEGIN_FRAME_TO_MAIN_THREAD from NextAction. | 117 // ACTION_SEND_BEGIN_FRAME_TO_MAIN_THREAD from NextAction. |
118 // Indicates that all painting is complete. | 118 // Indicates that all painting is complete. |
119 void FinishCommit(); | 119 void FinishCommit(); |
120 | 120 |
121 // Call this only in response to receiving an | 121 // Call this only in response to receiving an |
122 // ACTION_SEND_BEGIN_FRAME_TO_MAIN_THREAD from NextAction if the client | 122 // ACTION_SEND_BEGIN_FRAME_TO_MAIN_THREAD from NextAction if the client |
123 // rejects the begin frame message. | 123 // rejects the begin frame message. If cancel_commit is false, then |
124 void BeginFrameAbortedByMainThread(); | 124 // another commit will be retried soon. |
125 void BeginFrameAbortedByMainThread(bool cancel_commit); | |
125 | 126 |
126 // Request exclusive access to the textures that back single buffered | 127 // Request exclusive access to the textures that back single buffered |
127 // layers on behalf of the main thread. Upon acquisition, | 128 // layers on behalf of the main thread. Upon acquisition, |
128 // ACTION_DRAW_IF_POSSIBLE will not draw until the main thread releases the | 129 // ACTION_DRAW_IF_POSSIBLE will not draw until the main thread releases the |
129 // textures to the impl thread by committing the layers. | 130 // textures to the impl thread by committing the layers. |
130 void SetMainThreadNeedsLayerTextures(); | 131 void SetMainThreadNeedsLayerTextures(); |
131 | 132 |
132 // Set that we can create the first OutputSurface and start the scheduler. | 133 // Set that we can create the first OutputSurface and start the scheduler. |
133 void SetCanStart() { can_start_ = true; } | 134 void SetCanStart() { can_start_ = true; } |
134 | 135 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 bool HasDrawnThisFrame() const; | 169 bool HasDrawnThisFrame() const; |
169 bool HasAttemptedTreeActivationThisFrame() const; | 170 bool HasAttemptedTreeActivationThisFrame() const; |
170 bool HasCheckedForCompletedTileUploadsThisFrame() const; | 171 bool HasCheckedForCompletedTileUploadsThisFrame() const; |
171 | 172 |
172 const SchedulerSettings settings_; | 173 const SchedulerSettings settings_; |
173 | 174 |
174 CommitState commit_state_; | 175 CommitState commit_state_; |
175 int commit_count_; | 176 int commit_count_; |
176 | 177 |
177 int current_frame_number_; | 178 int current_frame_number_; |
179 int last_frame_number_where_commit_was_aborted_; | |
brianderson
2013/07/13 01:26:42
Can you change this to be last_frame_number_begin_
enne (OOO)
2013/07/15 22:23:28
Done.
| |
178 int last_frame_number_where_draw_was_called_; | 180 int last_frame_number_where_draw_was_called_; |
179 int last_frame_number_where_tree_activation_attempted_; | 181 int last_frame_number_where_tree_activation_attempted_; |
180 int last_frame_number_where_check_for_completed_tile_uploads_called_; | 182 int last_frame_number_where_check_for_completed_tile_uploads_called_; |
181 int consecutive_failed_draws_; | 183 int consecutive_failed_draws_; |
182 int maximum_number_of_failed_draws_before_draw_is_forced_; | 184 int maximum_number_of_failed_draws_before_draw_is_forced_; |
183 bool needs_redraw_; | 185 bool needs_redraw_; |
184 bool swap_used_incomplete_tile_; | 186 bool swap_used_incomplete_tile_; |
185 bool needs_forced_redraw_; | 187 bool needs_forced_redraw_; |
186 bool needs_forced_redraw_after_next_commit_; | 188 bool needs_forced_redraw_after_next_commit_; |
187 bool needs_commit_; | 189 bool needs_commit_; |
(...skipping 11 matching lines...) Expand all Loading... | |
199 OutputSurfaceState output_surface_state_; | 201 OutputSurfaceState output_surface_state_; |
200 bool did_create_and_initialize_first_output_surface_; | 202 bool did_create_and_initialize_first_output_surface_; |
201 | 203 |
202 private: | 204 private: |
203 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 205 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
204 }; | 206 }; |
205 | 207 |
206 } // namespace cc | 208 } // namespace cc |
207 | 209 |
208 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 210 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
OLD | NEW |