| 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 CCThreadProxy_h | 5 #ifndef CCThreadProxy_h |
| 6 #define CCThreadProxy_h | 6 #define CCThreadProxy_h |
| 7 | 7 |
| 8 #include "CCAnimationEvents.h" | 8 #include "CCAnimationEvents.h" |
| 9 #include "CCCompletionEvent.h" | 9 #include "CCCompletionEvent.h" |
| 10 #include "CCLayerTreeHostImpl.h" | 10 #include "CCLayerTreeHostImpl.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // CCProxy implementation | 32 // CCProxy implementation |
| 33 virtual bool compositeAndReadback(void *pixels, const IntRect&) OVERRIDE; | 33 virtual bool compositeAndReadback(void *pixels, const IntRect&) OVERRIDE; |
| 34 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use
Anchor, float scale, double duration) OVERRIDE; | 34 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use
Anchor, float scale, double duration) OVERRIDE; |
| 35 virtual void finishAllRendering() OVERRIDE; | 35 virtual void finishAllRendering() OVERRIDE; |
| 36 virtual bool isStarted() const OVERRIDE; | 36 virtual bool isStarted() const OVERRIDE; |
| 37 virtual bool initializeContext() OVERRIDE; | 37 virtual bool initializeContext() OVERRIDE; |
| 38 virtual void setSurfaceReady() OVERRIDE; | 38 virtual void setSurfaceReady() OVERRIDE; |
| 39 virtual void setVisible(bool) OVERRIDE; | 39 virtual void setVisible(bool) OVERRIDE; |
| 40 virtual bool initializeRenderer() OVERRIDE; | 40 virtual bool initializeRenderer() OVERRIDE; |
| 41 virtual bool recreateContext() OVERRIDE; | 41 virtual bool recreateContext() OVERRIDE; |
| 42 virtual int compositorIdentifier() const OVERRIDE; | |
| 43 virtual void implSideRenderingStats(CCRenderingStats&) OVERRIDE; | 42 virtual void implSideRenderingStats(CCRenderingStats&) OVERRIDE; |
| 44 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE; | 43 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE; |
| 45 virtual void loseContext() OVERRIDE; | 44 virtual void loseContext() OVERRIDE; |
| 46 virtual void setNeedsAnimate() OVERRIDE; | 45 virtual void setNeedsAnimate() OVERRIDE; |
| 47 virtual void setNeedsCommit() OVERRIDE; | 46 virtual void setNeedsCommit() OVERRIDE; |
| 48 virtual void setNeedsRedraw() OVERRIDE; | 47 virtual void setNeedsRedraw() OVERRIDE; |
| 49 virtual bool commitRequested() const OVERRIDE; | 48 virtual bool commitRequested() const OVERRIDE; |
| 50 virtual void didAddAnimation() OVERRIDE { } | 49 virtual void didAddAnimation() OVERRIDE { } |
| 51 virtual void start() OVERRIDE; | 50 virtual void start() OVERRIDE; |
| 52 virtual void stop() OVERRIDE; | 51 virtual void stop() OVERRIDE; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 bool success; | 105 bool success; |
| 107 void* pixels; | 106 void* pixels; |
| 108 IntRect rect; | 107 IntRect rect; |
| 109 }; | 108 }; |
| 110 void forceBeginFrameOnImplThread(CCCompletionEvent*); | 109 void forceBeginFrameOnImplThread(CCCompletionEvent*); |
| 111 void beginFrameCompleteOnImplThread(CCCompletionEvent*, PassOwnPtr<CCTexture
UpdateQueue>, bool contentsTexturesWereDeleted); | 110 void beginFrameCompleteOnImplThread(CCCompletionEvent*, PassOwnPtr<CCTexture
UpdateQueue>, bool contentsTexturesWereDeleted); |
| 112 void beginFrameAbortedOnImplThread(); | 111 void beginFrameAbortedOnImplThread(); |
| 113 void requestReadbackOnImplThread(ReadbackRequest*); | 112 void requestReadbackOnImplThread(ReadbackRequest*); |
| 114 void requestStartPageScaleAnimationOnImplThread(IntSize targetPosition, bool
useAnchor, float scale, double durationSec); | 113 void requestStartPageScaleAnimationOnImplThread(IntSize targetPosition, bool
useAnchor, float scale, double durationSec); |
| 115 void finishAllRenderingOnImplThread(CCCompletionEvent*); | 114 void finishAllRenderingOnImplThread(CCCompletionEvent*); |
| 116 void initializeImplOnImplThread(CCCompletionEvent*); | 115 void initializeImplOnImplThread(CCCompletionEvent*, PassOwnPtr<CCInputHandle
r>); |
| 117 void setSurfaceReadyOnImplThread(); | 116 void setSurfaceReadyOnImplThread(); |
| 118 void setVisibleOnImplThread(CCCompletionEvent*, bool); | 117 void setVisibleOnImplThread(CCCompletionEvent*, bool); |
| 119 void initializeContextOnImplThread(CCGraphicsContext*); | 118 void initializeContextOnImplThread(CCGraphicsContext*); |
| 120 void initializeRendererOnImplThread(CCCompletionEvent*, bool* initializeSucc
eeded, RendererCapabilities*); | 119 void initializeRendererOnImplThread(CCCompletionEvent*, bool* initializeSucc
eeded, RendererCapabilities*); |
| 121 void layerTreeHostClosedOnImplThread(CCCompletionEvent*); | 120 void layerTreeHostClosedOnImplThread(CCCompletionEvent*); |
| 122 void setFullRootLayerDamageOnImplThread(); | 121 void setFullRootLayerDamageOnImplThread(); |
| 123 void acquireLayerTexturesForMainThreadOnImplThread(CCCompletionEvent*); | 122 void acquireLayerTexturesForMainThreadOnImplThread(CCCompletionEvent*); |
| 124 void recreateContextOnImplThread(CCCompletionEvent*, CCGraphicsContext*, boo
l* recreateSucceeded, RendererCapabilities*); | 123 void recreateContextOnImplThread(CCCompletionEvent*, CCGraphicsContext*, boo
l* recreateSucceeded, RendererCapabilities*); |
| 125 void implSideRenderingStatsOnImplThread(CCCompletionEvent*, CCRenderingStats
*); | 124 void implSideRenderingStatsOnImplThread(CCCompletionEvent*, CCRenderingStats
*); |
| 126 CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool f
orcedDraw); | 125 CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool f
orcedDraw); |
| 127 void forceSerializeOnSwapBuffersOnImplThread(CCCompletionEvent*); | 126 void forceSerializeOnSwapBuffersOnImplThread(CCCompletionEvent*); |
| 128 void setNeedsForcedCommitOnImplThread(); | 127 void setNeedsForcedCommitOnImplThread(); |
| 129 | 128 |
| 130 // Accessed on main thread only. | 129 // Accessed on main thread only. |
| 131 bool m_animateRequested; // Set only when setNeedsAnimate is called. | 130 bool m_animateRequested; // Set only when setNeedsAnimate is called. |
| 132 bool m_commitRequested; // Set only when setNeedsCommit is called. | 131 bool m_commitRequested; // Set only when setNeedsCommit is called. |
| 133 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA
nimate. | 132 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA
nimate. |
| 134 bool m_forcedCommitRequested; | 133 bool m_forcedCommitRequested; |
| 135 OwnPtr<CCThreadProxyContextRecreationTimer> m_contextRecreationTimer; | 134 OwnPtr<CCThreadProxyContextRecreationTimer> m_contextRecreationTimer; |
| 136 CCLayerTreeHost* m_layerTreeHost; | 135 CCLayerTreeHost* m_layerTreeHost; |
| 137 int m_compositorIdentifier; | |
| 138 bool m_rendererInitialized; | 136 bool m_rendererInitialized; |
| 139 RendererCapabilities m_RendererCapabilitiesMainThreadCopy; | 137 RendererCapabilities m_RendererCapabilitiesMainThreadCopy; |
| 140 bool m_started; | 138 bool m_started; |
| 141 bool m_texturesAcquired; | 139 bool m_texturesAcquired; |
| 142 bool m_inCompositeAndReadback; | 140 bool m_inCompositeAndReadback; |
| 143 | 141 |
| 144 OwnPtr<CCLayerTreeHostImpl> m_layerTreeHostImpl; | 142 OwnPtr<CCLayerTreeHostImpl> m_layerTreeHostImpl; |
| 145 | 143 |
| 146 OwnPtr<CCInputHandler> m_inputHandlerOnImplThread; | 144 OwnPtr<CCInputHandler> m_inputHandlerOnImplThread; |
| 147 | 145 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 173 | 171 |
| 174 // Set when the next draw should post didCommitAndDrawFrame to the main thre
ad. | 172 // Set when the next draw should post didCommitAndDrawFrame to the main thre
ad. |
| 175 bool m_nextFrameIsNewlyCommittedFrameOnImplThread; | 173 bool m_nextFrameIsNewlyCommittedFrameOnImplThread; |
| 176 | 174 |
| 177 bool m_renderVSyncEnabled; | 175 bool m_renderVSyncEnabled; |
| 178 }; | 176 }; |
| 179 | 177 |
| 180 } | 178 } |
| 181 | 179 |
| 182 #endif | 180 #endif |
| OLD | NEW |