| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. | 71 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. |
| 72 bool commit_request_sent_to_impl_thread; | 72 bool commit_request_sent_to_impl_thread; |
| 73 | 73 |
| 74 bool started; | 74 bool started; |
| 75 bool manage_tiles_pending; | 75 bool manage_tiles_pending; |
| 76 bool can_cancel_commit; | 76 bool can_cancel_commit; |
| 77 bool defer_commits; | 77 bool defer_commits; |
| 78 | 78 |
| 79 RendererCapabilities renderer_capabilities_main_thread_copy; | 79 RendererCapabilities renderer_capabilities_main_thread_copy; |
| 80 | 80 |
| 81 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit; | |
| 82 base::WeakPtrFactory<ThreadProxy> weak_factory; | 81 base::WeakPtrFactory<ThreadProxy> weak_factory; |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 // Accessed on the main thread, or when main thread is blocked. | 84 // Accessed on the main thread, or when main thread is blocked. |
| 86 struct MainThreadOrBlockedMainThread { | 85 struct MainThreadOrBlockedMainThread { |
| 87 explicit MainThreadOrBlockedMainThread(LayerTreeHost* host); | 86 explicit MainThreadOrBlockedMainThread(LayerTreeHost* host); |
| 88 ~MainThreadOrBlockedMainThread(); | 87 ~MainThreadOrBlockedMainThread(); |
| 89 | 88 |
| 90 PrioritizedResourceManager* contents_texture_manager(); | 89 PrioritizedResourceManager* contents_texture_manager(); |
| 91 | 90 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 DrawResult DrawSwapInternal(bool forced_draw); | 270 DrawResult DrawSwapInternal(bool forced_draw); |
| 272 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); | 271 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
| 273 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, | 272 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, |
| 274 bool* main_frame_will_happen); | 273 bool* main_frame_will_happen); |
| 275 void AsValueOnImplThread(CompletionEvent* completion, | 274 void AsValueOnImplThread(CompletionEvent* completion, |
| 276 base::debug::TracedValue* state) const; | 275 base::debug::TracedValue* 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 |