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 21 matching lines...) Expand all Loading... |
32 bool didDraw; | 32 bool didDraw; |
33 bool didSwap; | 33 bool didSwap; |
34 }; | 34 }; |
35 | 35 |
36 class SchedulerClient { | 36 class SchedulerClient { |
37 public: | 37 public: |
38 virtual void scheduledActionBeginFrame() = 0; | 38 virtual void scheduledActionBeginFrame() = 0; |
39 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossibl
e() = 0; | 39 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossibl
e() = 0; |
40 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced()
= 0; | 40 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced()
= 0; |
41 virtual void scheduledActionCommit() = 0; | 41 virtual void scheduledActionCommit() = 0; |
| 42 virtual void scheduledActionCheckForCompletedTextures() = 0; |
42 virtual void scheduledActionActivatePendingTreeIfNeeded() = 0; | 43 virtual void scheduledActionActivatePendingTreeIfNeeded() = 0; |
43 virtual void scheduledActionBeginContextRecreation() = 0; | 44 virtual void scheduledActionBeginContextRecreation() = 0; |
44 virtual void scheduledActionAcquireLayerTexturesForMainThread() = 0; | 45 virtual void scheduledActionAcquireLayerTexturesForMainThread() = 0; |
45 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) = 0; | 46 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) = 0; |
46 | 47 |
47 protected: | 48 protected: |
48 virtual ~SchedulerClient() { } | 49 virtual ~SchedulerClient() { } |
49 }; | 50 }; |
50 | 51 |
51 class CC_EXPORT Scheduler : FrameRateControllerClient { | 52 class CC_EXPORT Scheduler : FrameRateControllerClient { |
(...skipping 18 matching lines...) Expand all Loading... |
70 // Like setNeedsCommit(), but ensures a commit will definitely happen even i
f we are not visible. | 71 // Like setNeedsCommit(), but ensures a commit will definitely happen even i
f we are not visible. |
71 void setNeedsForcedCommit(); | 72 void setNeedsForcedCommit(); |
72 | 73 |
73 void setNeedsRedraw(); | 74 void setNeedsRedraw(); |
74 | 75 |
75 void setMainThreadNeedsLayerTextures(); | 76 void setMainThreadNeedsLayerTextures(); |
76 | 77 |
77 // Like setNeedsRedraw(), but ensures the draw will definitely happen even i
f we are not visible. | 78 // Like setNeedsRedraw(), but ensures the draw will definitely happen even i
f we are not visible. |
78 void setNeedsForcedRedraw(); | 79 void setNeedsForcedRedraw(); |
79 | 80 |
| 81 void didSwapUseIncompleteTexture(); |
| 82 |
80 void beginFrameComplete(); | 83 void beginFrameComplete(); |
81 void beginFrameAborted(); | 84 void beginFrameAborted(); |
82 | 85 |
83 void setMaxFramesPending(int); | 86 void setMaxFramesPending(int); |
84 int maxFramesPending() const; | 87 int maxFramesPending() const; |
85 | 88 |
86 void setSwapBuffersCompleteSupported(bool); | 89 void setSwapBuffersCompleteSupported(bool); |
87 void didSwapBuffersComplete(); | 90 void didSwapBuffersComplete(); |
88 | 91 |
89 void didLoseOutputSurface(); | 92 void didLoseOutputSurface(); |
(...skipping 20 matching lines...) Expand all Loading... |
110 scoped_ptr<FrameRateController> m_frameRateController; | 113 scoped_ptr<FrameRateController> m_frameRateController; |
111 SchedulerStateMachine m_stateMachine; | 114 SchedulerStateMachine m_stateMachine; |
112 bool m_insideProcessScheduledActions; | 115 bool m_insideProcessScheduledActions; |
113 | 116 |
114 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 117 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
115 }; | 118 }; |
116 | 119 |
117 } // namespace cc | 120 } // namespace cc |
118 | 121 |
119 #endif // CC_SCHEDULER_H_ | 122 #endif // CC_SCHEDULER_H_ |
OLD | NEW |