| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 void layerTreeHostClosedOnImplThread(CompletionEvent*); | 127 void layerTreeHostClosedOnImplThread(CompletionEvent*); |
| 128 void manageTilesOnImplThread(); | 128 void manageTilesOnImplThread(); |
| 129 void setFullRootLayerDamageOnImplThread(); | 129 void setFullRootLayerDamageOnImplThread(); |
| 130 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*); | 130 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*); |
| 131 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu
rface>, bool* recreateSucceeded, RendererCapabilities*); | 131 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu
rface>, bool* recreateSucceeded, RendererCapabilities*); |
| 132 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); | 132 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); |
| 133 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for
cedDraw); | 133 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for
cedDraw); |
| 134 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); | 134 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); |
| 135 void setNeedsForcedCommitOnImplThread(); | 135 void setNeedsForcedCommitOnImplThread(); |
| 136 void commitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 136 void commitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
| 137 void blockUntilPendingActivationIfNeeded(); |
| 138 void blockUntilPendingActivationOnImplThread(CompletionEvent*); |
| 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 22 matching lines...) Expand all Loading... |
| 169 | 171 |
| 170 // Set when the main thread is waiting on a readback. | 172 // Set when the main thread is waiting on a readback. |
| 171 ReadbackRequest* m_readbackRequestOnImplThread; | 173 ReadbackRequest* m_readbackRequestOnImplThread; |
| 172 | 174 |
| 173 // Set when the main thread is waiting on a commit to complete. | 175 // Set when the main thread is waiting on a commit to complete. |
| 174 CompletionEvent* m_commitCompletionEventOnImplThread; | 176 CompletionEvent* m_commitCompletionEventOnImplThread; |
| 175 | 177 |
| 176 // Set when the main thread is waiting on layers to be drawn. | 178 // Set when the main thread is waiting on layers to be drawn. |
| 177 CompletionEvent* m_textureAcquisitionCompletionEventOnImplThread; | 179 CompletionEvent* m_textureAcquisitionCompletionEventOnImplThread; |
| 178 | 180 |
| 181 // Set when the main thread is waiting for pending tree activation. |
| 182 CompletionEvent* m_pendingTreeActivationEventOnImplThread; |
| 183 |
| 179 scoped_ptr<ResourceUpdateController> m_currentResourceUpdateControllerOnImpl
Thread; | 184 scoped_ptr<ResourceUpdateController> m_currentResourceUpdateControllerOnImpl
Thread; |
| 180 | 185 |
| 181 // Set when the next draw should post didCommitAndDrawFrame to the main thre
ad. | 186 // Set when the next draw should post didCommitAndDrawFrame to the main thre
ad. |
| 182 bool m_nextFrameIsNewlyCommittedFrameOnImplThread; | 187 bool m_nextFrameIsNewlyCommittedFrameOnImplThread; |
| 183 | 188 |
| 184 bool m_renderVSyncEnabled; | 189 bool m_renderVSyncEnabled; |
| 185 | 190 |
| 186 base::TimeDelta m_totalCommitTime; | 191 base::TimeDelta m_totalCommitTime; |
| 187 size_t m_totalCommitCount; | 192 size_t m_totalCommitCount; |
| 188 | 193 |
| 189 bool m_deferCommits; | 194 bool m_deferCommits; |
| 190 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; | 195 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; |
| 191 }; | 196 }; |
| 192 | 197 |
| 193 } // namespace cc | 198 } // namespace cc |
| 194 | 199 |
| 195 #endif // CC_THREAD_PROXY_H_ | 200 #endif // CC_THREAD_PROXY_H_ |
| OLD | NEW |