| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 bool animate_requested; | 66 bool animate_requested; |
| 67 // Set only when SetNeedsCommit is called. | 67 // Set only when SetNeedsCommit is called. |
| 68 bool commit_requested; | 68 bool commit_requested; |
| 69 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. | 69 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. |
| 70 bool commit_request_sent_to_impl_thread; | 70 bool commit_request_sent_to_impl_thread; |
| 71 | 71 |
| 72 bool started; | 72 bool started; |
| 73 bool manage_tiles_pending; | 73 bool manage_tiles_pending; |
| 74 bool can_cancel_commit; | 74 bool can_cancel_commit; |
| 75 bool defer_commits; | 75 bool defer_commits; |
| 76 bool host_client_finished_; |
| 76 | 77 |
| 77 RendererCapabilities renderer_capabilities_main_thread_copy; | 78 RendererCapabilities renderer_capabilities_main_thread_copy; |
| 78 | 79 |
| 79 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit; | 80 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit; |
| 80 base::WeakPtrFactory<ThreadProxy> weak_factory; | 81 base::WeakPtrFactory<ThreadProxy> weak_factory; |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 // Accessed on the main thread, or when main thread is blocked. | 84 // Accessed on the main thread, or when main thread is blocked. |
| 84 struct MainThreadOrBlockedMainThread { | 85 struct MainThreadOrBlockedMainThread { |
| 85 explicit MainThreadOrBlockedMainThread(LayerTreeHost* host); | 86 explicit MainThreadOrBlockedMainThread(LayerTreeHost* host); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 }; | 147 }; |
| 147 | 148 |
| 148 const MainThreadOnly& main() const; | 149 const MainThreadOnly& main() const; |
| 149 const MainThreadOrBlockedMainThread& blocked_main() const; | 150 const MainThreadOrBlockedMainThread& blocked_main() const; |
| 150 const CompositorThreadOnly& impl() const; | 151 const CompositorThreadOnly& impl() const; |
| 151 | 152 |
| 152 // Proxy implementation | 153 // Proxy implementation |
| 153 virtual void FinishAllRendering() OVERRIDE; | 154 virtual void FinishAllRendering() OVERRIDE; |
| 154 virtual bool IsStarted() const OVERRIDE; | 155 virtual bool IsStarted() const OVERRIDE; |
| 155 virtual void SetLayerTreeHostClientReady() OVERRIDE; | 156 virtual void SetLayerTreeHostClientReady() OVERRIDE; |
| 157 virtual void SetLayerTreeHostClientFinished() OVERRIDE; |
| 156 virtual void SetVisible(bool visible) OVERRIDE; | 158 virtual void SetVisible(bool visible) OVERRIDE; |
| 157 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; | 159 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; |
| 158 virtual void SetNeedsAnimate() OVERRIDE; | 160 virtual void SetNeedsAnimate() OVERRIDE; |
| 159 virtual void SetNeedsUpdateLayers() OVERRIDE; | 161 virtual void SetNeedsUpdateLayers() OVERRIDE; |
| 160 virtual void SetNeedsCommit() OVERRIDE; | 162 virtual void SetNeedsCommit() OVERRIDE; |
| 161 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; | 163 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; |
| 162 virtual void SetNextCommitWaitsForActivation() OVERRIDE; | 164 virtual void SetNextCommitWaitsForActivation() OVERRIDE; |
| 163 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; | 165 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; |
| 164 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; | 166 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; |
| 165 virtual bool CommitRequested() const OVERRIDE; | 167 virtual bool CommitRequested() const OVERRIDE; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 299 |
| 298 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 300 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
| 299 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 301 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
| 300 | 302 |
| 301 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 303 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
| 302 }; | 304 }; |
| 303 | 305 |
| 304 } // namespace cc | 306 } // namespace cc |
| 305 | 307 |
| 306 #endif // CC_TREES_THREAD_PROXY_H_ | 308 #endif // CC_TREES_THREAD_PROXY_H_ |
| OLD | NEW |