| 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_TREES_THREAD_PROXY_H_ | 5 #ifndef CC_TREES_THREAD_PROXY_H_ |
| 6 #define CC_TREES_THREAD_PROXY_H_ | 6 #define CC_TREES_THREAD_PROXY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 // Called on main thread. | 143 // Called on main thread. |
| 144 void SetRendererCapabilitiesMainThreadCopy( | 144 void SetRendererCapabilitiesMainThreadCopy( |
| 145 const RendererCapabilities& capabilities); | 145 const RendererCapabilities& capabilities); |
| 146 void BeginMainFrame( | 146 void BeginMainFrame( |
| 147 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); | 147 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); |
| 148 void DidCommitAndDrawFrame(); | 148 void DidCommitAndDrawFrame(); |
| 149 void DidCompleteSwapBuffers(); | 149 void DidCompleteSwapBuffers(); |
| 150 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue); | 150 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue); |
| 151 void DidLoseOutputSurface(); |
| 151 void CreateAndInitializeOutputSurface(); | 152 void CreateAndInitializeOutputSurface(); |
| 152 void DoCreateAndInitializeOutputSurface(); | 153 void DidInitializeOutputSurface(bool success, |
| 154 const RendererCapabilities& capabilities); |
| 153 void SendCommitRequestToImplThreadIfNeeded(); | 155 void SendCommitRequestToImplThreadIfNeeded(); |
| 154 | 156 |
| 155 // Called on impl thread. | 157 // Called on impl thread. |
| 156 struct CommitPendingRequest; | 158 struct CommitPendingRequest; |
| 157 struct SchedulerStateRequest; | 159 struct SchedulerStateRequest; |
| 158 | 160 |
| 159 void StartCommitOnImplThread(CompletionEvent* completion, | 161 void StartCommitOnImplThread(CompletionEvent* completion, |
| 160 ResourceUpdateQueue* queue); | 162 ResourceUpdateQueue* queue); |
| 161 void BeginMainFrameAbortedOnImplThread(bool did_handle); | 163 void BeginMainFrameAbortedOnImplThread(bool did_handle); |
| 162 void FinishAllRenderingOnImplThread(CompletionEvent* completion); | 164 void FinishAllRenderingOnImplThread(CompletionEvent* completion); |
| 163 void InitializeImplOnImplThread(CompletionEvent* completion); | 165 void InitializeImplOnImplThread(CompletionEvent* completion); |
| 164 void SetLayerTreeHostClientReadyOnImplThread(); | 166 void SetLayerTreeHostClientReadyOnImplThread(); |
| 165 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); | 167 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); |
| 166 void UpdateBackgroundAnimateTicking(); | 168 void UpdateBackgroundAnimateTicking(); |
| 167 void HasInitializedOutputSurfaceOnImplThread( | 169 void HasInitializedOutputSurfaceOnImplThread( |
| 168 CompletionEvent* completion, | 170 CompletionEvent* completion, |
| 169 bool* has_initialized_output_surface); | 171 bool* has_initialized_output_surface); |
| 172 void DeleteContentsTexturesOnImplThread(CompletionEvent* completion); |
| 170 void InitializeOutputSurfaceOnImplThread( | 173 void InitializeOutputSurfaceOnImplThread( |
| 171 CompletionEvent* completion, | 174 scoped_ptr<OutputSurface> output_surface); |
| 172 scoped_ptr<OutputSurface> output_surface, | |
| 173 bool* success, | |
| 174 RendererCapabilities* capabilities); | |
| 175 void FinishGLOnImplThread(CompletionEvent* completion); | 175 void FinishGLOnImplThread(CompletionEvent* completion); |
| 176 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); | 176 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); |
| 177 DrawResult DrawSwapInternal(bool forced_draw); | 177 DrawResult DrawSwapInternal(bool forced_draw); |
| 178 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); | 178 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
| 179 void CheckOutputSurfaceStatusOnImplThread(); | 179 void CheckOutputSurfaceStatusOnImplThread(); |
| 180 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 180 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
| 181 void SchedulerAsValueOnImplThreadForTesting(SchedulerStateRequest* request); | 181 void SchedulerAsValueOnImplThreadForTesting(SchedulerStateRequest* request); |
| 182 void AsValueOnImplThread(CompletionEvent* completion, | 182 void AsValueOnImplThread(CompletionEvent* completion, |
| 183 base::DictionaryValue* state) const; | 183 base::DictionaryValue* state) const; |
| 184 void RenewTreePriorityOnImplThread(); | 184 void RenewTreePriorityOnImplThread(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 201 // Set only when SetNeedsCommit is called. | 201 // Set only when SetNeedsCommit is called. |
| 202 bool commit_requested; | 202 bool commit_requested; |
| 203 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. | 203 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. |
| 204 bool commit_request_sent_to_impl_thread; | 204 bool commit_request_sent_to_impl_thread; |
| 205 | 205 |
| 206 bool started; | 206 bool started; |
| 207 bool manage_tiles_pending; | 207 bool manage_tiles_pending; |
| 208 bool can_cancel_commit; | 208 bool can_cancel_commit; |
| 209 bool defer_commits; | 209 bool defer_commits; |
| 210 | 210 |
| 211 base::CancelableClosure output_surface_creation_callback; | |
| 212 RendererCapabilities renderer_capabilities_main_thread_copy; | 211 RendererCapabilities renderer_capabilities_main_thread_copy; |
| 213 | 212 |
| 214 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit; | 213 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit; |
| 215 base::WeakPtrFactory<ThreadProxy> weak_factory; | 214 base::WeakPtrFactory<ThreadProxy> weak_factory; |
| 216 }; | 215 }; |
| 217 // Use accessors instead of this variable directly. | 216 // Use accessors instead of this variable directly. |
| 218 MainThreadOnly main_thread_only_vars_unsafe_; | 217 MainThreadOnly main_thread_only_vars_unsafe_; |
| 219 MainThreadOnly& main(); | 218 MainThreadOnly& main(); |
| 220 const MainThreadOnly& main() const; | 219 const MainThreadOnly& main() const; |
| 221 | 220 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 291 |
| 293 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 292 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
| 294 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 293 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
| 295 | 294 |
| 296 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 295 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
| 297 }; | 296 }; |
| 298 | 297 |
| 299 } // namespace cc | 298 } // namespace cc |
| 300 | 299 |
| 301 #endif // CC_TREES_THREAD_PROXY_H_ | 300 #endif // CC_TREES_THREAD_PROXY_H_ |
| OLD | NEW |