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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 virtual void setNeedsRedraw() OVERRIDE; | 48 virtual void setNeedsRedraw() OVERRIDE; |
49 virtual void setDeferCommits(bool) OVERRIDE; | 49 virtual void setDeferCommits(bool) OVERRIDE; |
50 virtual bool commitRequested() const OVERRIDE; | 50 virtual bool commitRequested() const OVERRIDE; |
51 virtual void mainThreadHasStoppedFlinging() OVERRIDE; | 51 virtual void mainThreadHasStoppedFlinging() OVERRIDE; |
52 virtual void start() OVERRIDE; | 52 virtual void start() OVERRIDE; |
53 virtual void stop() OVERRIDE; | 53 virtual void stop() OVERRIDE; |
54 virtual size_t maxPartialTextureUpdates() const OVERRIDE; | 54 virtual size_t maxPartialTextureUpdates() const OVERRIDE; |
55 virtual void acquireLayerTextures() OVERRIDE; | 55 virtual void acquireLayerTextures() OVERRIDE; |
56 virtual void forceSerializeOnSwapBuffers() OVERRIDE; | 56 virtual void forceSerializeOnSwapBuffers() OVERRIDE; |
57 virtual bool commitPendingForTesting() OVERRIDE; | 57 virtual bool commitPendingForTesting() OVERRIDE; |
| 58 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 setNeedsCommitOnImplThread() OVERRIDE; | 67 virtual void setNeedsCommitOnImplThread() OVERRIDE; |
67 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; | 68 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void layerTreeHostClosedOnImplThread(CompletionEvent*); | 128 void layerTreeHostClosedOnImplThread(CompletionEvent*); |
128 void manageTilesOnImplThread(); | 129 void manageTilesOnImplThread(); |
129 void setFullRootLayerDamageOnImplThread(); | 130 void setFullRootLayerDamageOnImplThread(); |
130 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*); | 131 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*); |
131 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu
rface>, bool* recreateSucceeded, RendererCapabilities*); | 132 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu
rface>, bool* recreateSucceeded, RendererCapabilities*); |
132 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); | 133 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); |
133 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for
cedDraw); | 134 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for
cedDraw); |
134 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); | 135 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); |
135 void setNeedsForcedCommitOnImplThread(); | 136 void setNeedsForcedCommitOnImplThread(); |
136 void commitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 137 void commitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
| 138 void capturePictureOnImplThread(CompletionEvent*, skia::RefPtr<SkPicture>*); |
137 | 139 |
138 // Accessed on main thread only. | 140 // Accessed on main thread only. |
139 bool m_animateRequested; // Set only when setNeedsAnimate is called. | 141 bool m_animateRequested; // Set only when setNeedsAnimate is called. |
140 bool m_commitRequested; // Set only when setNeedsCommit is called. | 142 bool m_commitRequested; // Set only when setNeedsCommit is called. |
141 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA
nimate. | 143 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA
nimate. |
142 base::CancelableClosure m_outputSurfaceRecreationCallback; | 144 base::CancelableClosure m_outputSurfaceRecreationCallback; |
143 LayerTreeHost* m_layerTreeHost; | 145 LayerTreeHost* m_layerTreeHost; |
144 bool m_rendererInitialized; | 146 bool m_rendererInitialized; |
145 RendererCapabilities m_RendererCapabilitiesMainThreadCopy; | 147 RendererCapabilities m_RendererCapabilitiesMainThreadCopy; |
146 bool m_started; | 148 bool m_started; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 base::TimeDelta m_totalCommitTime; | 189 base::TimeDelta m_totalCommitTime; |
188 size_t m_totalCommitCount; | 190 size_t m_totalCommitCount; |
189 | 191 |
190 bool m_deferCommits; | 192 bool m_deferCommits; |
191 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; | 193 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; |
192 }; | 194 }; |
193 | 195 |
194 } // namespace cc | 196 } // namespace cc |
195 | 197 |
196 #endif // CC_THREAD_PROXY_H_ | 198 #endif // CC_THREAD_PROXY_H_ |
OLD | NEW |