| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 bool BeginFrameNeededToDrawByImplThread() const; | 114 bool BeginFrameNeededToDrawByImplThread() const; |
| 115 bool ProactiveBeginFrameWantedByImplThread() const; | 115 bool ProactiveBeginFrameWantedByImplThread() const; |
| 116 | 116 |
| 117 // Indicates that the system has entered and left a BeginFrame callback. | 117 // Indicates that the system has entered and left a BeginFrame callback. |
| 118 // The scheduler will not draw more than once in a given BeginFrame | 118 // The scheduler will not draw more than once in a given BeginFrame |
| 119 // callback nor send more than one BeginFrame message. | 119 // callback nor send more than one BeginFrame message. |
| 120 void DidEnterBeginFrame(const BeginFrameArgs& args); | 120 void DidEnterBeginFrame(const BeginFrameArgs& args); |
| 121 void DidLeaveBeginFrame(); | 121 void DidLeaveBeginFrame(); |
| 122 bool inside_begin_frame() const { return inside_begin_frame_; } | 122 bool inside_begin_frame() const { return inside_begin_frame_; } |
| 123 | 123 |
| 124 // PollForAnticipatedDrawTriggers is used by the synchronous compositor to |
| 125 // avoid requesting BeginImplFrames when we won't actually draw but still |
| 126 // need to advance our state at vsync intervals. |
| 127 void PollForAnticipatedDrawTriggers(); |
| 128 |
| 124 // Indicates whether the LayerTreeHostImpl is visible. | 129 // Indicates whether the LayerTreeHostImpl is visible. |
| 125 void SetVisible(bool visible); | 130 void SetVisible(bool visible); |
| 126 | 131 |
| 127 // Indicates that a redraw is required, either due to the impl tree changing | 132 // Indicates that a redraw is required, either due to the impl tree changing |
| 128 // or the screen being damaged and simply needing redisplay. | 133 // or the screen being damaged and simply needing redisplay. |
| 129 void SetNeedsRedraw(); | 134 void SetNeedsRedraw(); |
| 130 | 135 |
| 131 // Indicates whether a redraw is required because we are currently rendering | 136 // Indicates whether a redraw is required because we are currently rendering |
| 132 // with a low resolution or checkerboarded tile. | 137 // with a low resolution or checkerboarded tile. |
| 133 void SetSwapUsedIncompleteTile(bool used_incomplete_tile); | 138 void SetSwapUsedIncompleteTile(bool used_incomplete_tile); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 bool draw_if_possible_failed_; | 241 bool draw_if_possible_failed_; |
| 237 bool did_create_and_initialize_first_output_surface_; | 242 bool did_create_and_initialize_first_output_surface_; |
| 238 | 243 |
| 239 private: | 244 private: |
| 240 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 245 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 241 }; | 246 }; |
| 242 | 247 |
| 243 } // namespace cc | 248 } // namespace cc |
| 244 | 249 |
| 245 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 250 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| OLD | NEW |