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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // avoid requesting BeginImplFrames when we won't actually draw but still | 149 // avoid requesting BeginImplFrames when we won't actually draw but still |
150 // need to advance our state at vsync intervals. | 150 // need to advance our state at vsync intervals. |
151 void DidEnterPollForAnticipatedDrawTriggers(); | 151 void DidEnterPollForAnticipatedDrawTriggers(); |
152 void DidLeavePollForAnticipatedDrawTriggers(); | 152 void DidLeavePollForAnticipatedDrawTriggers(); |
153 bool inside_poll_for_anticipated_draw_triggers() const { | 153 bool inside_poll_for_anticipated_draw_triggers() const { |
154 return inside_poll_for_anticipated_draw_triggers_; | 154 return inside_poll_for_anticipated_draw_triggers_; |
155 } | 155 } |
156 | 156 |
157 // Indicates whether the LayerTreeHostImpl is visible. | 157 // Indicates whether the LayerTreeHostImpl is visible. |
158 void SetVisible(bool visible); | 158 void SetVisible(bool visible); |
| 159 bool visible() const { return visible_; } |
159 | 160 |
160 // Indicates that a redraw is required, either due to the impl tree changing | 161 // Indicates that a redraw is required, either due to the impl tree changing |
161 // or the screen being damaged and simply needing redisplay. | 162 // or the screen being damaged and simply needing redisplay. |
162 void SetNeedsRedraw(); | 163 void SetNeedsRedraw(); |
163 bool needs_redraw() const { return needs_redraw_; } | 164 bool needs_redraw() const { return needs_redraw_; } |
164 | 165 |
165 void SetNeedsAnimate(); | 166 void SetNeedsAnimate(); |
166 bool needs_animate() const { return needs_animate_; } | 167 bool needs_animate() const { return needs_animate_; } |
167 | 168 |
168 // Indicates that prepare-tiles is required. This guarantees another | 169 // Indicates that prepare-tiles is required. This guarantees another |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 bool impl_latency_takes_priority_on_battery_; | 336 bool impl_latency_takes_priority_on_battery_; |
336 bool children_need_begin_frames_; | 337 bool children_need_begin_frames_; |
337 | 338 |
338 private: | 339 private: |
339 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 340 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
340 }; | 341 }; |
341 | 342 |
342 } // namespace cc | 343 } // namespace cc |
343 | 344 |
344 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 345 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
OLD | NEW |