| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 // Indicates that the system has entered and left a BeginImplFrame callback. | 150 // Indicates that the system has entered and left a BeginImplFrame callback. |
| 151 // The scheduler will not draw more than once in a given BeginImplFrame | 151 // The scheduler will not draw more than once in a given BeginImplFrame |
| 152 // callback nor send more than one BeginMainFrame message. | 152 // callback nor send more than one BeginMainFrame message. |
| 153 void OnBeginImplFrame(); | 153 void OnBeginImplFrame(); |
| 154 // Indicates that the scheduler has entered the draw phase. The scheduler | 154 // Indicates that the scheduler has entered the draw phase. The scheduler |
| 155 // will not draw more than once in a single draw phase. | 155 // will not draw more than once in a single draw phase. |
| 156 // TODO(sunnyps): Rename OnBeginImplFrameDeadline to OnDraw or similar. | 156 // TODO(sunnyps): Rename OnBeginImplFrameDeadline to OnDraw or similar. |
| 157 void OnBeginImplFrameDeadline(); | 157 void OnBeginImplFrameDeadline(); |
| 158 void OnBeginImplFrameIdle(); | 158 void OnBeginImplFrameIdle(); |
| 159 |
| 160 int current_frame_number() const { return current_frame_number_; } |
| 161 |
| 159 BeginImplFrameState begin_impl_frame_state() const { | 162 BeginImplFrameState begin_impl_frame_state() const { |
| 160 return begin_impl_frame_state_; | 163 return begin_impl_frame_state_; |
| 161 } | 164 } |
| 162 BeginImplFrameDeadlineMode CurrentBeginImplFrameDeadlineMode() const; | 165 BeginImplFrameDeadlineMode CurrentBeginImplFrameDeadlineMode() const; |
| 163 | 166 |
| 164 // If the main thread didn't manage to produce a new frame in time for the | 167 // If the main thread didn't manage to produce a new frame in time for the |
| 165 // impl thread to draw, it is in a high latency mode. | 168 // impl thread to draw, it is in a high latency mode. |
| 166 bool main_thread_missed_last_deadline() const { | 169 bool main_thread_missed_last_deadline() const { |
| 167 return main_thread_missed_last_deadline_; | 170 return main_thread_missed_last_deadline_; |
| 168 } | 171 } |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 bool did_draw_in_last_frame_; | 351 bool did_draw_in_last_frame_; |
| 349 bool did_swap_in_last_frame_; | 352 bool did_swap_in_last_frame_; |
| 350 | 353 |
| 351 private: | 354 private: |
| 352 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 355 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 353 }; | 356 }; |
| 354 | 357 |
| 355 } // namespace cc | 358 } // namespace cc |
| 356 | 359 |
| 357 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 360 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| OLD | NEW |