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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 virtual void setNeedsCommit() OVERRIDE; | 46 virtual void setNeedsCommit() OVERRIDE; |
47 virtual void setNeedsRedraw() OVERRIDE; | 47 virtual void setNeedsRedraw() OVERRIDE; |
48 virtual void setDeferCommits(bool) OVERRIDE; | 48 virtual void setDeferCommits(bool) OVERRIDE; |
49 virtual bool commitRequested() const OVERRIDE; | 49 virtual bool commitRequested() const OVERRIDE; |
50 virtual void mainThreadHasStoppedFlinging() OVERRIDE; | 50 virtual void mainThreadHasStoppedFlinging() OVERRIDE; |
51 virtual void start() OVERRIDE; | 51 virtual void start() OVERRIDE; |
52 virtual void stop() OVERRIDE; | 52 virtual void stop() OVERRIDE; |
53 virtual size_t maxPartialTextureUpdates() const OVERRIDE; | 53 virtual size_t maxPartialTextureUpdates() const OVERRIDE; |
54 virtual void acquireLayerTextures() OVERRIDE; | 54 virtual void acquireLayerTextures() OVERRIDE; |
55 virtual void forceSerializeOnSwapBuffers() OVERRIDE; | 55 virtual void forceSerializeOnSwapBuffers() OVERRIDE; |
| 56 virtual skia::RefPtr<SkPicture> capturePicture() OVERRIDE; |
| 57 virtual scoped_ptr<base::Value> asValue() const OVERRIDE; |
56 virtual bool commitPendingForTesting() OVERRIDE; | 58 virtual bool commitPendingForTesting() OVERRIDE; |
57 virtual skia::RefPtr<SkPicture> capturePicture() OVERRIDE; | |
58 | 59 |
59 // LayerTreeHostImplClient implementation | 60 // LayerTreeHostImplClient implementation |
60 virtual void didLoseOutputSurfaceOnImplThread() OVERRIDE; | 61 virtual void didLoseOutputSurfaceOnImplThread() OVERRIDE; |
61 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; | 62 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; |
62 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE; | 63 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE; |
63 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE; | 64 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE; |
64 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) OVERRIDE; | 65 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) OVERRIDE; |
65 virtual void setNeedsRedrawOnImplThread() OVERRIDE; | 66 virtual void setNeedsRedrawOnImplThread() OVERRIDE; |
66 virtual void didUploadVisibleHighResolutionTileOnImplThread() OVERRIDE; | 67 virtual void didUploadVisibleHighResolutionTileOnImplThread() OVERRIDE; |
67 virtual void setNeedsCommitOnImplThread() OVERRIDE; | 68 virtual void setNeedsCommitOnImplThread() OVERRIDE; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 void setFullRootLayerDamageOnImplThread(); | 138 void setFullRootLayerDamageOnImplThread(); |
138 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*); | 139 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*); |
139 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu
rface>, bool* recreateSucceeded, RendererCapabilities*); | 140 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu
rface>, bool* recreateSucceeded, RendererCapabilities*); |
140 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); | 141 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); |
141 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for
cedDraw); | 142 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for
cedDraw); |
142 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); | 143 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); |
143 void setNeedsForcedCommitOnImplThread(); | 144 void setNeedsForcedCommitOnImplThread(); |
144 void checkOutputSurfaceStatusOnImplThread(); | 145 void checkOutputSurfaceStatusOnImplThread(); |
145 void commitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 146 void commitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
146 void capturePictureOnImplThread(CompletionEvent*, skia::RefPtr<SkPicture>*); | 147 void capturePictureOnImplThread(CompletionEvent*, skia::RefPtr<SkPicture>*); |
| 148 void asValueOnImplThread(CompletionEvent*, base::DictionaryValue*) const; |
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; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 bool m_deferCommits; | 209 bool m_deferCommits; |
208 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; | 210 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; |
209 | 211 |
210 base::TimeTicks m_smoothnessTakesPriorityExpirationTime; | 212 base::TimeTicks m_smoothnessTakesPriorityExpirationTime; |
211 bool m_renewTreePriorityOnImplThreadPending; | 213 bool m_renewTreePriorityOnImplThreadPending; |
212 }; | 214 }; |
213 | 215 |
214 } // namespace cc | 216 } // namespace cc |
215 | 217 |
216 #endif // CC_THREAD_PROXY_H_ | 218 #endif // CC_THREAD_PROXY_H_ |
OLD | NEW |