| 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_H_ | 5 #ifndef CC_SCHEDULER_H_ |
| 6 #define CC_SCHEDULER_H_ | 6 #define CC_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Like setNeedsRedraw(), but ensures the draw will definitely happen even i
f we are not visible. | 72 // Like setNeedsRedraw(), but ensures the draw will definitely happen even i
f we are not visible. |
| 73 void setNeedsForcedRedraw(); | 73 void setNeedsForcedRedraw(); |
| 74 | 74 |
| 75 void beginFrameComplete(); | 75 void beginFrameComplete(); |
| 76 void beginFrameAborted(); | 76 void beginFrameAborted(); |
| 77 | 77 |
| 78 void setMaxFramesPending(int); | 78 void setMaxFramesPending(int); |
| 79 void setSwapBuffersCompleteSupported(bool); | 79 void setSwapBuffersCompleteSupported(bool); |
| 80 void didSwapBuffersComplete(); | 80 void didSwapBuffersComplete(); |
| 81 | 81 |
| 82 void didLoseContext(); | 82 void didLoseOutputSurface(); |
| 83 void didRecreateContext(); | 83 void didRecreateOutputSurface(); |
| 84 | 84 |
| 85 bool commitPending() const { return m_stateMachine.commitPending(); } | 85 bool commitPending() const { return m_stateMachine.commitPending(); } |
| 86 bool redrawPending() const { return m_stateMachine.redrawPending(); } | 86 bool redrawPending() const { return m_stateMachine.redrawPending(); } |
| 87 | 87 |
| 88 void setTimebaseAndInterval(base::TimeTicks timebase, base::TimeDelta interv
al); | 88 void setTimebaseAndInterval(base::TimeTicks timebase, base::TimeDelta interv
al); |
| 89 | 89 |
| 90 base::TimeTicks anticipatedDrawTime(); | 90 base::TimeTicks anticipatedDrawTime(); |
| 91 | 91 |
| 92 // FrameRateControllerClient implementation | 92 // FrameRateControllerClient implementation |
| 93 virtual void vsyncTick(bool throttled) OVERRIDE; | 93 virtual void vsyncTick(bool throttled) OVERRIDE; |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 Scheduler(SchedulerClient*, scoped_ptr<FrameRateController>); | 96 Scheduler(SchedulerClient*, scoped_ptr<FrameRateController>); |
| 97 | 97 |
| 98 void processScheduledActions(); | 98 void processScheduledActions(); |
| 99 | 99 |
| 100 SchedulerClient* m_client; | 100 SchedulerClient* m_client; |
| 101 scoped_ptr<FrameRateController> m_frameRateController; | 101 scoped_ptr<FrameRateController> m_frameRateController; |
| 102 SchedulerStateMachine m_stateMachine; | 102 SchedulerStateMachine m_stateMachine; |
| 103 bool m_insideProcessScheduledActions; | 103 bool m_insideProcessScheduledActions; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 105 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 } // namespace cc | 108 } // namespace cc |
| 109 | 109 |
| 110 #endif // CC_SCHEDULER_H_ | 110 #endif // CC_SCHEDULER_H_ |
| OLD | NEW |