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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 void SendCommitRequestToImplThreadIfNeeded(); | 153 void SendCommitRequestToImplThreadIfNeeded(); |
154 | 154 |
155 // Called on impl thread. | 155 // Called on impl thread. |
156 struct ReadbackRequest; | 156 struct ReadbackRequest; |
157 struct CommitPendingRequest; | 157 struct CommitPendingRequest; |
158 struct SchedulerStateRequest; | 158 struct SchedulerStateRequest; |
159 | 159 |
160 void ForceCommitForReadbackOnImplThread( | 160 void ForceCommitForReadbackOnImplThread( |
161 CompletionEvent* begin_main_frame_sent_completion, | 161 CompletionEvent* begin_main_frame_sent_completion, |
162 ReadbackRequest* request); | 162 ReadbackRequest* request); |
163 void StartCommitOnImplThread( | 163 void StartCommitOnImplThread(CompletionEvent* completion, |
164 CompletionEvent* completion, | 164 ResourceUpdateQueue* queue); |
165 ResourceUpdateQueue* queue, | |
166 scoped_refptr<ContextProvider> offscreen_context_provider); | |
167 void BeginMainFrameAbortedOnImplThread(bool did_handle); | 165 void BeginMainFrameAbortedOnImplThread(bool did_handle); |
168 void RequestReadbackOnImplThread(ReadbackRequest* request); | 166 void RequestReadbackOnImplThread(ReadbackRequest* request); |
169 void FinishAllRenderingOnImplThread(CompletionEvent* completion); | 167 void FinishAllRenderingOnImplThread(CompletionEvent* completion); |
170 void InitializeImplOnImplThread(CompletionEvent* completion); | 168 void InitializeImplOnImplThread(CompletionEvent* completion); |
171 void SetLayerTreeHostClientReadyOnImplThread(); | 169 void SetLayerTreeHostClientReadyOnImplThread(); |
172 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); | 170 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); |
173 void UpdateBackgroundAnimateTicking(); | 171 void UpdateBackgroundAnimateTicking(); |
174 void HasInitializedOutputSurfaceOnImplThread( | 172 void HasInitializedOutputSurfaceOnImplThread( |
175 CompletionEvent* completion, | 173 CompletionEvent* completion, |
176 bool* has_initialized_output_surface); | 174 bool* has_initialized_output_surface); |
177 void InitializeOutputSurfaceOnImplThread( | 175 void InitializeOutputSurfaceOnImplThread( |
178 CompletionEvent* completion, | 176 CompletionEvent* completion, |
179 scoped_ptr<OutputSurface> output_surface, | 177 scoped_ptr<OutputSurface> output_surface, |
180 scoped_refptr<ContextProvider> offscreen_context_provider, | |
181 bool* success, | 178 bool* success, |
182 RendererCapabilities* capabilities); | 179 RendererCapabilities* capabilities); |
183 void FinishGLOnImplThread(CompletionEvent* completion); | 180 void FinishGLOnImplThread(CompletionEvent* completion); |
184 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); | 181 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); |
185 DrawSwapReadbackResult DrawSwapReadbackInternal(bool forced_draw, | 182 DrawSwapReadbackResult DrawSwapReadbackInternal(bool forced_draw, |
186 bool swap_requested, | 183 bool swap_requested, |
187 bool readback_requested); | 184 bool readback_requested); |
188 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); | 185 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
189 void CheckOutputSurfaceStatusOnImplThread(); | 186 void CheckOutputSurfaceStatusOnImplThread(); |
190 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 187 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
(...skipping 16 matching lines...) Expand all Loading... |
207 ~MainThreadOnly(); | 204 ~MainThreadOnly(); |
208 | 205 |
209 const int layer_tree_host_id; | 206 const int layer_tree_host_id; |
210 | 207 |
211 // Set only when SetNeedsAnimate is called. | 208 // Set only when SetNeedsAnimate is called. |
212 bool animate_requested; | 209 bool animate_requested; |
213 // Set only when SetNeedsCommit is called. | 210 // Set only when SetNeedsCommit is called. |
214 bool commit_requested; | 211 bool commit_requested; |
215 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. | 212 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. |
216 bool commit_request_sent_to_impl_thread; | 213 bool commit_request_sent_to_impl_thread; |
217 // Set by BeginMainFrame | |
218 bool created_offscreen_context_provider; | |
219 | 214 |
220 bool started; | 215 bool started; |
221 bool in_composite_and_readback; | 216 bool in_composite_and_readback; |
222 bool manage_tiles_pending; | 217 bool manage_tiles_pending; |
223 bool can_cancel_commit; | 218 bool can_cancel_commit; |
224 bool defer_commits; | 219 bool defer_commits; |
225 | 220 |
226 base::CancelableClosure output_surface_creation_callback; | 221 base::CancelableClosure output_surface_creation_callback; |
227 RendererCapabilities renderer_capabilities_main_thread_copy; | 222 RendererCapabilities renderer_capabilities_main_thread_copy; |
228 | 223 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 301 |
307 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 302 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
308 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 303 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
309 | 304 |
310 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 305 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
311 }; | 306 }; |
312 | 307 |
313 } // namespace cc | 308 } // namespace cc |
314 | 309 |
315 #endif // CC_TREES_THREAD_PROXY_H_ | 310 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |