| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Indicates whether the main thread needs a begin frame callback in order to | 73 // Indicates whether the main thread needs a begin frame callback in order to |
| 74 // make progress. | 74 // make progress. |
| 75 bool BeginFrameNeededByImplThread() const; | 75 bool BeginFrameNeededByImplThread() const; |
| 76 | 76 |
| 77 // Indicates that the system has entered and left a BeginFrame callback. | 77 // Indicates that the system has entered and left a BeginFrame callback. |
| 78 // The scheduler will not draw more than once in a given BeginFrame | 78 // The scheduler will not draw more than once in a given BeginFrame |
| 79 // callback. | 79 // callback. |
| 80 void DidEnterBeginFrame(); | 80 void DidEnterBeginFrame(); |
| 81 void DidLeaveBeginFrame(); | 81 void DidLeaveBeginFrame(); |
| 82 bool inside_begin_frame() const { return inside_begin_frame_; } |
| 82 | 83 |
| 83 // Indicates whether the LayerTreeHostImpl is visible. | 84 // Indicates whether the LayerTreeHostImpl is visible. |
| 84 void SetVisible(bool visible); | 85 void SetVisible(bool visible); |
| 85 | 86 |
| 86 // Indicates that a redraw is required, either due to the impl tree changing | 87 // Indicates that a redraw is required, either due to the impl tree changing |
| 87 // or the screen being damaged and simply needing redisplay. | 88 // or the screen being damaged and simply needing redisplay. |
| 88 void SetNeedsRedraw(); | 89 void SetNeedsRedraw(); |
| 89 | 90 |
| 90 // As SetNeedsRedraw(), but ensures the draw will definitely happen even if | 91 // As SetNeedsRedraw(), but ensures the draw will definitely happen even if |
| 91 // we are not visible. | 92 // we are not visible. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 TextureState texture_state_; | 193 TextureState texture_state_; |
| 193 OutputSurfaceState output_surface_state_; | 194 OutputSurfaceState output_surface_state_; |
| 194 bool did_create_and_initialize_first_output_surface_; | 195 bool did_create_and_initialize_first_output_surface_; |
| 195 | 196 |
| 196 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 197 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 197 }; | 198 }; |
| 198 | 199 |
| 199 } // namespace cc | 200 } // namespace cc |
| 200 | 201 |
| 201 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 202 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| OLD | NEW |