| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 virtual bool commitPendingForTesting() OVERRIDE; | 56 virtual bool commitPendingForTesting() OVERRIDE; |
| 57 virtual skia::RefPtr<SkPicture> capturePicture() OVERRIDE; | 57 virtual skia::RefPtr<SkPicture> capturePicture() OVERRIDE; |
| 58 | 58 |
| 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 didSwapUseIncompleteTextureOnImplThread() OVERRIDE; |
| 67 virtual void didUploadVisibleHighResolutionTileOnImplTread() OVERRIDE; |
| 66 virtual void setNeedsCommitOnImplThread() OVERRIDE; | 68 virtual void setNeedsCommitOnImplThread() OVERRIDE; |
| 67 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; | 69 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; |
| 68 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) OVERRIDE; | 70 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) OVERRIDE; |
| 69 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) OVERRIDE; | 71 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) OVERRIDE; |
| 70 virtual void sendManagedMemoryStats() OVERRIDE; | 72 virtual void sendManagedMemoryStats() OVERRIDE; |
| 73 virtual bool isInsideDraw() OVERRIDE; |
| 71 | 74 |
| 72 // SchedulerClient implementation | 75 // SchedulerClient implementation |
| 73 virtual void scheduledActionBeginFrame() OVERRIDE; | 76 virtual void scheduledActionBeginFrame() OVERRIDE; |
| 74 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossibl
e() OVERRIDE; | 77 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossibl
e() OVERRIDE; |
| 75 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced()
OVERRIDE; | 78 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced()
OVERRIDE; |
| 76 virtual void scheduledActionCommit() OVERRIDE; | 79 virtual void scheduledActionCommit() OVERRIDE; |
| 80 virtual void scheduledActionCheckForCompletedTextures() OVERRIDE; |
| 77 virtual void scheduledActionActivatePendingTreeIfNeeded() OVERRIDE; | 81 virtual void scheduledActionActivatePendingTreeIfNeeded() OVERRIDE; |
| 78 virtual void scheduledActionBeginContextRecreation() OVERRIDE; | 82 virtual void scheduledActionBeginContextRecreation() OVERRIDE; |
| 79 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; | 83 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; |
| 80 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE; | 84 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE; |
| 81 | 85 |
| 82 // ResourceUpdateControllerClient implementation | 86 // ResourceUpdateControllerClient implementation |
| 83 virtual void readyToFinalizeTextureUpdates() OVERRIDE; | 87 virtual void readyToFinalizeTextureUpdates() OVERRIDE; |
| 84 | 88 |
| 85 int maxFramesPendingForTesting() const { return m_schedulerOnImplThread->max
FramesPending(); } | 89 int maxFramesPendingForTesting() const { return m_schedulerOnImplThread->max
FramesPending(); } |
| 86 | 90 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // Set when the main thread is waiting on layers to be drawn. | 188 // Set when the main thread is waiting on layers to be drawn. |
| 185 CompletionEvent* m_textureAcquisitionCompletionEventOnImplThread; | 189 CompletionEvent* m_textureAcquisitionCompletionEventOnImplThread; |
| 186 | 190 |
| 187 scoped_ptr<ResourceUpdateController> m_currentResourceUpdateControllerOnImpl
Thread; | 191 scoped_ptr<ResourceUpdateController> m_currentResourceUpdateControllerOnImpl
Thread; |
| 188 | 192 |
| 189 // Set when the next draw should post didCommitAndDrawFrame to the main thre
ad. | 193 // Set when the next draw should post didCommitAndDrawFrame to the main thre
ad. |
| 190 bool m_nextFrameIsNewlyCommittedFrameOnImplThread; | 194 bool m_nextFrameIsNewlyCommittedFrameOnImplThread; |
| 191 | 195 |
| 192 bool m_renderVSyncEnabled; | 196 bool m_renderVSyncEnabled; |
| 193 | 197 |
| 198 bool m_insideDraw; |
| 199 |
| 194 base::TimeDelta m_totalCommitTime; | 200 base::TimeDelta m_totalCommitTime; |
| 195 size_t m_totalCommitCount; | 201 size_t m_totalCommitCount; |
| 196 | 202 |
| 197 bool m_deferCommits; | 203 bool m_deferCommits; |
| 198 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; | 204 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; |
| 199 }; | 205 }; |
| 200 | 206 |
| 201 } // namespace cc | 207 } // namespace cc |
| 202 | 208 |
| 203 #endif // CC_THREAD_PROXY_H_ | 209 #endif // CC_THREAD_PROXY_H_ |
| OLD | NEW |