| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 bool commitPendingForTesting() OVERRIDE; | 56 virtual bool commitPendingForTesting() OVERRIDE; |
| 57 virtual skia::RefPtr<SkPicture> capturePicture() OVERRIDE; |
| 57 | 58 |
| 58 // LayerTreeHostImplClient implementation | 59 // LayerTreeHostImplClient implementation |
| 59 virtual void didLoseOutputSurfaceOnImplThread() OVERRIDE; | 60 virtual void didLoseOutputSurfaceOnImplThread() OVERRIDE; |
| 60 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; | 61 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; |
| 61 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE; | 62 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE; |
| 62 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE; | 63 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE; |
| 63 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) OVERRIDE; | 64 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) OVERRIDE; |
| 64 virtual void setNeedsRedrawOnImplThread() OVERRIDE; | 65 virtual void setNeedsRedrawOnImplThread() OVERRIDE; |
| 65 virtual void setNeedsCommitOnImplThread() OVERRIDE; | 66 virtual void setNeedsCommitOnImplThread() OVERRIDE; |
| 66 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; | 67 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void layerTreeHostClosedOnImplThread(CompletionEvent*); | 127 void layerTreeHostClosedOnImplThread(CompletionEvent*); |
| 127 void manageTilesOnImplThread(); | 128 void manageTilesOnImplThread(); |
| 128 void setFullRootLayerDamageOnImplThread(); | 129 void setFullRootLayerDamageOnImplThread(); |
| 129 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*); | 130 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*); |
| 130 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu
rface>, bool* recreateSucceeded, RendererCapabilities*); | 131 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu
rface>, bool* recreateSucceeded, RendererCapabilities*); |
| 131 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); | 132 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); |
| 132 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for
cedDraw); | 133 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for
cedDraw); |
| 133 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); | 134 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); |
| 134 void setNeedsForcedCommitOnImplThread(); | 135 void setNeedsForcedCommitOnImplThread(); |
| 135 void commitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 136 void commitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
| 137 void capturePictureOnImplThread(CompletionEvent*, skia::RefPtr<SkPicture>*); |
| 136 | 138 |
| 137 // Accessed on main thread only. | 139 // Accessed on main thread only. |
| 138 bool m_animateRequested; // Set only when setNeedsAnimate is called. | 140 bool m_animateRequested; // Set only when setNeedsAnimate is called. |
| 139 bool m_commitRequested; // Set only when setNeedsCommit is called. | 141 bool m_commitRequested; // Set only when setNeedsCommit is called. |
| 140 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA
nimate. | 142 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA
nimate. |
| 141 base::CancelableClosure m_outputSurfaceRecreationCallback; | 143 base::CancelableClosure m_outputSurfaceRecreationCallback; |
| 142 LayerTreeHost* m_layerTreeHost; | 144 LayerTreeHost* m_layerTreeHost; |
| 143 bool m_rendererInitialized; | 145 bool m_rendererInitialized; |
| 144 RendererCapabilities m_RendererCapabilitiesMainThreadCopy; | 146 RendererCapabilities m_RendererCapabilitiesMainThreadCopy; |
| 145 bool m_started; | 147 bool m_started; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 base::TimeDelta m_totalCommitTime; | 188 base::TimeDelta m_totalCommitTime; |
| 187 size_t m_totalCommitCount; | 189 size_t m_totalCommitCount; |
| 188 | 190 |
| 189 bool m_deferCommits; | 191 bool m_deferCommits; |
| 190 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; | 192 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; |
| 191 }; | 193 }; |
| 192 | 194 |
| 193 } // namespace cc | 195 } // namespace cc |
| 194 | 196 |
| 195 #endif // CC_THREAD_PROXY_H_ | 197 #endif // CC_THREAD_PROXY_H_ |
| OLD | NEW |