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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. | 67 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. |
68 bool commit_request_sent_to_impl_thread; | 68 bool commit_request_sent_to_impl_thread; |
69 | 69 |
70 bool started; | 70 bool started; |
71 bool manage_tiles_pending; | 71 bool manage_tiles_pending; |
72 bool can_cancel_commit; | 72 bool can_cancel_commit; |
73 bool defer_commits; | 73 bool defer_commits; |
74 | 74 |
75 RendererCapabilities renderer_capabilities_main_thread_copy; | 75 RendererCapabilities renderer_capabilities_main_thread_copy; |
76 | 76 |
77 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit; | |
78 base::WeakPtrFactory<ThreadProxy> weak_factory; | 77 base::WeakPtrFactory<ThreadProxy> weak_factory; |
79 }; | 78 }; |
80 | 79 |
81 // Accessed on the main thread, or when main thread is blocked. | 80 // Accessed on the main thread, or when main thread is blocked. |
82 struct MainThreadOrBlockedMainThread { | 81 struct MainThreadOrBlockedMainThread { |
83 explicit MainThreadOrBlockedMainThread(LayerTreeHost* host); | 82 explicit MainThreadOrBlockedMainThread(LayerTreeHost* host); |
84 ~MainThreadOrBlockedMainThread(); | 83 ~MainThreadOrBlockedMainThread(); |
85 | 84 |
86 PrioritizedResourceManager* contents_texture_manager(); | 85 PrioritizedResourceManager* contents_texture_manager(); |
87 | 86 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); | 270 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
272 void CheckOutputSurfaceStatusOnImplThread(); | 271 void CheckOutputSurfaceStatusOnImplThread(); |
273 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 272 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
274 void SchedulerAsValueOnImplThreadForTesting(SchedulerStateRequest* request); | 273 void SchedulerAsValueOnImplThreadForTesting(SchedulerStateRequest* request); |
275 void AsValueOnImplThread(CompletionEvent* completion, | 274 void AsValueOnImplThread(CompletionEvent* completion, |
276 base::DictionaryValue* state) const; | 275 base::DictionaryValue* state) const; |
277 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); | 276 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); |
278 void MainThreadHasStoppedFlingingOnImplThread(); | 277 void MainThreadHasStoppedFlingingOnImplThread(); |
279 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); | 278 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); |
280 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); | 279 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); |
| 280 void SetDeferCommitsOnImplThread(bool defer_commits) const; |
281 | 281 |
282 LayerTreeHost* layer_tree_host(); | 282 LayerTreeHost* layer_tree_host(); |
283 const LayerTreeHost* layer_tree_host() const; | 283 const LayerTreeHost* layer_tree_host() const; |
284 | 284 |
285 // Use accessors instead of this variable directly. | 285 // Use accessors instead of this variable directly. |
286 MainThreadOnly main_thread_only_vars_unsafe_; | 286 MainThreadOnly main_thread_only_vars_unsafe_; |
287 MainThreadOnly& main(); | 287 MainThreadOnly& main(); |
288 | 288 |
289 // Use accessors instead of this variable directly. | 289 // Use accessors instead of this variable directly. |
290 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; | 290 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; |
291 MainThreadOrBlockedMainThread& blocked_main(); | 291 MainThreadOrBlockedMainThread& blocked_main(); |
292 | 292 |
293 // Use accessors instead of this variable directly. | 293 // Use accessors instead of this variable directly. |
294 CompositorThreadOnly compositor_thread_vars_unsafe_; | 294 CompositorThreadOnly compositor_thread_vars_unsafe_; |
295 CompositorThreadOnly& impl(); | 295 CompositorThreadOnly& impl(); |
296 | 296 |
297 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 297 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
298 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 298 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
299 | 299 |
300 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 300 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
301 }; | 301 }; |
302 | 302 |
303 } // namespace cc | 303 } // namespace cc |
304 | 304 |
305 #endif // CC_TREES_THREAD_PROXY_H_ | 305 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |