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/macros.h" | 10 #include "base/macros.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // TODO(sunnyps): Rename OnBeginImplFrameDeadline to OnDraw or similar. | 159 // TODO(sunnyps): Rename OnBeginImplFrameDeadline to OnDraw or similar. |
160 void OnBeginImplFrameDeadline(); | 160 void OnBeginImplFrameDeadline(); |
161 void OnBeginImplFrameIdle(); | 161 void OnBeginImplFrameIdle(); |
162 BeginImplFrameState begin_impl_frame_state() const { | 162 BeginImplFrameState begin_impl_frame_state() const { |
163 return begin_impl_frame_state_; | 163 return begin_impl_frame_state_; |
164 } | 164 } |
165 BeginImplFrameDeadlineMode CurrentBeginImplFrameDeadlineMode() const; | 165 BeginImplFrameDeadlineMode CurrentBeginImplFrameDeadlineMode() const; |
166 | 166 |
167 // 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 |
168 // impl thread to draw, it is in a high latency mode. | 168 // impl thread to draw, it is in a high latency mode. |
169 bool main_thread_missed_last_deadline() const; | 169 bool main_thread_missed_last_deadline() const { |
| 170 return main_thread_missed_last_deadline_; |
| 171 } |
170 | 172 |
171 bool SwapThrottled() const; | 173 bool SwapThrottled() const; |
172 | 174 |
173 // Indicates whether the LayerTreeHostImpl is visible. | 175 // Indicates whether the LayerTreeHostImpl is visible. |
174 void SetVisible(bool visible); | 176 void SetVisible(bool visible); |
175 bool visible() const { return visible_; } | 177 bool visible() const { return visible_; } |
176 | 178 |
177 void SetBeginFrameSourcePaused(bool paused); | 179 void SetBeginFrameSourcePaused(bool paused); |
178 bool begin_frame_source_paused() const { return begin_frame_source_paused_; } | 180 bool begin_frame_source_paused() const { return begin_frame_source_paused_; } |
179 | 181 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 bool did_draw_in_last_frame_; | 361 bool did_draw_in_last_frame_; |
360 bool did_swap_in_last_frame_; | 362 bool did_swap_in_last_frame_; |
361 | 363 |
362 private: | 364 private: |
363 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 365 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
364 }; | 366 }; |
365 | 367 |
366 } // namespace cc | 368 } // namespace cc |
367 | 369 |
368 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 370 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
OLD | NEW |