OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 virtual void didLoseContextOnImplThread(); | 75 virtual void didLoseContextOnImplThread(); |
76 virtual void onSwapBuffersCompleteOnImplThread(); | 76 virtual void onSwapBuffersCompleteOnImplThread(); |
77 virtual void setNeedsRedrawOnImplThread(); | 77 virtual void setNeedsRedrawOnImplThread(); |
78 virtual void setNeedsCommitOnImplThread(); | 78 virtual void setNeedsCommitOnImplThread(); |
79 virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimat
ionEventsVector>, double wallClockTime); | 79 virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimat
ionEventsVector>, double wallClockTime); |
80 | 80 |
81 // CCSchedulerClient implementation | 81 // CCSchedulerClient implementation |
82 virtual bool canDraw(); | 82 virtual bool canDraw(); |
83 virtual bool hasMoreResourceUpdates() const; | 83 virtual bool hasMoreResourceUpdates() const; |
84 virtual void scheduledActionBeginFrame(); | 84 virtual void scheduledActionBeginFrame(); |
85 virtual bool scheduledActionDrawAndSwapIfPossible(); | 85 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossi
ble(); |
86 virtual void scheduledActionDrawAndSwapForced(); | 86 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced(
); |
87 virtual void scheduledActionUpdateMoreResources(); | 87 virtual void scheduledActionUpdateMoreResources(); |
88 virtual void scheduledActionCommit(); | 88 virtual void scheduledActionCommit(); |
89 virtual void scheduledActionBeginContextRecreation(); | 89 virtual void scheduledActionBeginContextRecreation(); |
90 | 90 |
91 private: | 91 private: |
92 explicit CCThreadProxy(CCLayerTreeHost*); | 92 explicit CCThreadProxy(CCLayerTreeHost*); |
93 friend class CCThreadProxyContextRecreationTimer; | 93 friend class CCThreadProxyContextRecreationTimer; |
94 | 94 |
95 // Set on impl thread, read on main thread. | 95 // Set on impl thread, read on main thread. |
96 struct BeginFrameAndCommitState { | 96 struct BeginFrameAndCommitState { |
(...skipping 23 matching lines...) Expand all Loading... |
120 void requestReadbackOnImplThread(ReadbackRequest*); | 120 void requestReadbackOnImplThread(ReadbackRequest*); |
121 void requestStartPageScaleAnimationOnImplThread(IntSize targetPosition, bool
useAnchor, float scale, double durationSec); | 121 void requestStartPageScaleAnimationOnImplThread(IntSize targetPosition, bool
useAnchor, float scale, double durationSec); |
122 void finishAllRenderingOnImplThread(CCCompletionEvent*); | 122 void finishAllRenderingOnImplThread(CCCompletionEvent*); |
123 void initializeImplOnImplThread(CCCompletionEvent*); | 123 void initializeImplOnImplThread(CCCompletionEvent*); |
124 void initializeContextOnImplThread(GraphicsContext3D*); | 124 void initializeContextOnImplThread(GraphicsContext3D*); |
125 void initializeLayerRendererOnImplThread(CCCompletionEvent*, bool* initializ
eSucceeded, LayerRendererCapabilities*); | 125 void initializeLayerRendererOnImplThread(CCCompletionEvent*, bool* initializ
eSucceeded, LayerRendererCapabilities*); |
126 void setVisibleOnImplThread(CCCompletionEvent*, bool visible); | 126 void setVisibleOnImplThread(CCCompletionEvent*, bool visible); |
127 void layerTreeHostClosedOnImplThread(CCCompletionEvent*); | 127 void layerTreeHostClosedOnImplThread(CCCompletionEvent*); |
128 void setFullRootLayerDamageOnImplThread(); | 128 void setFullRootLayerDamageOnImplThread(); |
129 void recreateContextOnImplThread(CCCompletionEvent*, GraphicsContext3D*, boo
l* recreateSucceeded, LayerRendererCapabilities*); | 129 void recreateContextOnImplThread(CCCompletionEvent*, GraphicsContext3D*, boo
l* recreateSucceeded, LayerRendererCapabilities*); |
130 bool scheduledActionDrawAndSwapInternal(bool forcedDraw); | 130 CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool f
orcedDraw); |
131 | 131 |
132 // Accessed on main thread only. | 132 // Accessed on main thread only. |
133 bool m_animateRequested; | 133 bool m_animateRequested; |
134 bool m_commitRequested; | 134 bool m_commitRequested; |
135 bool m_contextLost; | 135 bool m_contextLost; |
136 OwnPtr<CCThreadProxyContextRecreationTimer> m_contextRecreationTimer; | 136 OwnPtr<CCThreadProxyContextRecreationTimer> m_contextRecreationTimer; |
137 CCLayerTreeHost* m_layerTreeHost; | 137 CCLayerTreeHost* m_layerTreeHost; |
138 int m_compositorIdentifier; | 138 int m_compositorIdentifier; |
139 bool m_layerRendererInitialized; | 139 bool m_layerRendererInitialized; |
140 LayerRendererCapabilities m_layerRendererCapabilitiesMainThreadCopy; | 140 LayerRendererCapabilities m_layerRendererCapabilitiesMainThreadCopy; |
(...skipping 25 matching lines...) Expand all Loading... |
166 CCCompletionEvent* m_commitCompletionEventOnImplThread; | 166 CCCompletionEvent* m_commitCompletionEventOnImplThread; |
167 OwnPtr<CCTextureUpdater> m_currentTextureUpdaterOnImplThread; | 167 OwnPtr<CCTextureUpdater> m_currentTextureUpdaterOnImplThread; |
168 | 168 |
169 // Set when the next draw should post didCommitAndDrawFrame to the main thre
ad. | 169 // Set when the next draw should post didCommitAndDrawFrame to the main thre
ad. |
170 bool m_nextFrameIsNewlyCommittedFrameOnImplThread; | 170 bool m_nextFrameIsNewlyCommittedFrameOnImplThread; |
171 }; | 171 }; |
172 | 172 |
173 } | 173 } |
174 | 174 |
175 #endif | 175 #endif |
OLD | NEW |