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