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_THREAD_PROXY_H_ | 5 #ifndef CC_THREAD_PROXY_H_ |
6 #define CC_THREAD_PROXY_H_ | 6 #define CC_THREAD_PROXY_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // LayerTreeHostImplClient implementation | 59 // LayerTreeHostImplClient implementation |
60 virtual void didLoseOutputSurfaceOnImplThread() OVERRIDE; | 60 virtual void didLoseOutputSurfaceOnImplThread() OVERRIDE; |
61 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; | 61 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; |
62 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE; | 62 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE; |
63 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE; | 63 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE; |
64 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) OVERRIDE; | 64 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) OVERRIDE; |
65 virtual void setNeedsRedrawOnImplThread() OVERRIDE; | 65 virtual void setNeedsRedrawOnImplThread() OVERRIDE; |
66 virtual void didUploadVisibleHighResolutionTileOnImplThread() OVERRIDE; | 66 virtual void didUploadVisibleHighResolutionTileOnImplThread() OVERRIDE; |
67 virtual void setNeedsCommitOnImplThread() OVERRIDE; | 67 virtual void setNeedsCommitOnImplThread() OVERRIDE; |
68 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; | 68 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; |
| 69 virtual void setNeedsCheckForCompletedRasterTasksOnImplThread() OVERRIDE; |
69 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) OVERRIDE; | 70 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) OVERRIDE; |
70 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) OVERRIDE; | 71 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) OVERRIDE; |
71 virtual void reduceWastedContentsTextureMemoryOnImplThread() OVERRIDE; | 72 virtual void reduceWastedContentsTextureMemoryOnImplThread() OVERRIDE; |
72 virtual void sendManagedMemoryStats() OVERRIDE; | 73 virtual void sendManagedMemoryStats() OVERRIDE; |
73 virtual bool isInsideDraw() OVERRIDE; | 74 virtual bool isInsideDraw() OVERRIDE; |
74 virtual void renewTreePriority() OVERRIDE; | 75 virtual void renewTreePriority() OVERRIDE; |
75 | 76 |
76 // SchedulerClient implementation | 77 // SchedulerClient implementation |
77 virtual void scheduledActionBeginFrame() OVERRIDE; | 78 virtual void scheduledActionBeginFrame() OVERRIDE; |
78 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossibl
e() OVERRIDE; | 79 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossibl
e() OVERRIDE; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void requestReadbackOnImplThread(ReadbackRequest*); | 128 void requestReadbackOnImplThread(ReadbackRequest*); |
128 void requestStartPageScaleAnimationOnImplThread(gfx::Vector2d targetOffset,
bool useAnchor, float scale, base::TimeDelta duration); | 129 void requestStartPageScaleAnimationOnImplThread(gfx::Vector2d targetOffset,
bool useAnchor, float scale, base::TimeDelta duration); |
129 void finishAllRenderingOnImplThread(CompletionEvent*); | 130 void finishAllRenderingOnImplThread(CompletionEvent*); |
130 void initializeImplOnImplThread(CompletionEvent*, InputHandler*); | 131 void initializeImplOnImplThread(CompletionEvent*, InputHandler*); |
131 void setSurfaceReadyOnImplThread(); | 132 void setSurfaceReadyOnImplThread(); |
132 void setVisibleOnImplThread(CompletionEvent*, bool); | 133 void setVisibleOnImplThread(CompletionEvent*, bool); |
133 void initializeOutputSurfaceOnImplThread(scoped_ptr<OutputSurface>); | 134 void initializeOutputSurfaceOnImplThread(scoped_ptr<OutputSurface>); |
134 void initializeRendererOnImplThread(CompletionEvent*, bool* initializeSuccee
ded, RendererCapabilities*); | 135 void initializeRendererOnImplThread(CompletionEvent*, bool* initializeSuccee
ded, RendererCapabilities*); |
135 void layerTreeHostClosedOnImplThread(CompletionEvent*); | 136 void layerTreeHostClosedOnImplThread(CompletionEvent*); |
136 void manageTilesOnImplThread(); | 137 void manageTilesOnImplThread(); |
| 138 void checkForCompletedRasterTasksOnImplThread(); |
137 void setFullRootLayerDamageOnImplThread(); | 139 void setFullRootLayerDamageOnImplThread(); |
138 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*); | 140 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*); |
139 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu
rface>, bool* recreateSucceeded, RendererCapabilities*); | 141 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu
rface>, bool* recreateSucceeded, RendererCapabilities*); |
140 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); | 142 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); |
141 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for
cedDraw); | 143 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for
cedDraw); |
142 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); | 144 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); |
143 void setNeedsForcedCommitOnImplThread(); | 145 void setNeedsForcedCommitOnImplThread(); |
144 void checkOutputSurfaceStatusOnImplThread(); | 146 void checkOutputSurfaceStatusOnImplThread(); |
145 void commitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 147 void commitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
146 void capturePictureOnImplThread(CompletionEvent*, skia::RefPtr<SkPicture>*); | 148 void capturePictureOnImplThread(CompletionEvent*, skia::RefPtr<SkPicture>*); |
147 void renewTreePriorityOnImplThread(); | 149 void renewTreePriorityOnImplThread(); |
148 void didSwapUseIncompleteTileOnImplThread(); | 150 void didSwapUseIncompleteTileOnImplThread(); |
149 | 151 |
150 // Accessed on main thread only. | 152 // Accessed on main thread only. |
151 bool m_animateRequested; // Set only when setNeedsAnimate is called. | 153 bool m_animateRequested; // Set only when setNeedsAnimate is called. |
152 bool m_commitRequested; // Set only when setNeedsCommit is called. | 154 bool m_commitRequested; // Set only when setNeedsCommit is called. |
153 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA
nimate. | 155 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA
nimate. |
154 base::CancelableClosure m_outputSurfaceRecreationCallback; | 156 base::CancelableClosure m_outputSurfaceRecreationCallback; |
155 LayerTreeHost* m_layerTreeHost; | 157 LayerTreeHost* m_layerTreeHost; |
156 bool m_rendererInitialized; | 158 bool m_rendererInitialized; |
157 RendererCapabilities m_RendererCapabilitiesMainThreadCopy; | 159 RendererCapabilities m_RendererCapabilitiesMainThreadCopy; |
158 bool m_started; | 160 bool m_started; |
159 bool m_texturesAcquired; | 161 bool m_texturesAcquired; |
160 bool m_inCompositeAndReadback; | 162 bool m_inCompositeAndReadback; |
161 bool m_manageTilesPending; | 163 bool m_manageTilesPending; |
| 164 bool m_checkForCompletedRasterTasksPending; |
162 // Weak pointer to use when posting tasks to the impl thread. | 165 // Weak pointer to use when posting tasks to the impl thread. |
163 base::WeakPtr<ThreadProxy> m_implThreadWeakPtr; | 166 base::WeakPtr<ThreadProxy> m_implThreadWeakPtr; |
164 | 167 |
165 base::WeakPtrFactory<ThreadProxy> m_weakFactoryOnImplThread; | 168 base::WeakPtrFactory<ThreadProxy> m_weakFactoryOnImplThread; |
166 | 169 |
167 base::WeakPtr<ThreadProxy> m_mainThreadWeakPtr; | 170 base::WeakPtr<ThreadProxy> m_mainThreadWeakPtr; |
168 base::WeakPtrFactory<ThreadProxy> m_weakFactory; | 171 base::WeakPtrFactory<ThreadProxy> m_weakFactory; |
169 | 172 |
170 scoped_ptr<LayerTreeHostImpl> m_layerTreeHostImpl; | 173 scoped_ptr<LayerTreeHostImpl> m_layerTreeHostImpl; |
171 | 174 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 bool m_deferCommits; | 210 bool m_deferCommits; |
208 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; | 211 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; |
209 | 212 |
210 base::TimeTicks m_smoothnessTakesPriorityExpirationTime; | 213 base::TimeTicks m_smoothnessTakesPriorityExpirationTime; |
211 bool m_renewTreePriorityOnImplThreadPending; | 214 bool m_renewTreePriorityOnImplThreadPending; |
212 }; | 215 }; |
213 | 216 |
214 } // namespace cc | 217 } // namespace cc |
215 | 218 |
216 #endif // CC_THREAD_PROXY_H_ | 219 #endif // CC_THREAD_PROXY_H_ |
OLD | NEW |