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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 virtual void FinishAllRendering() OVERRIDE; | 45 virtual void FinishAllRendering() OVERRIDE; |
46 virtual bool IsStarted() const OVERRIDE; | 46 virtual bool IsStarted() const OVERRIDE; |
47 virtual void SetLayerTreeHostClientReady() OVERRIDE; | 47 virtual void SetLayerTreeHostClientReady() OVERRIDE; |
48 virtual void SetVisible(bool visible) OVERRIDE; | 48 virtual void SetVisible(bool visible) OVERRIDE; |
49 virtual void CreateAndInitializeOutputSurface() OVERRIDE; | 49 virtual void CreateAndInitializeOutputSurface() OVERRIDE; |
50 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; | 50 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; |
51 virtual void SetNeedsAnimate() OVERRIDE; | 51 virtual void SetNeedsAnimate() OVERRIDE; |
52 virtual void SetNeedsUpdateLayers() OVERRIDE; | 52 virtual void SetNeedsUpdateLayers() OVERRIDE; |
53 virtual void SetNeedsCommit() OVERRIDE; | 53 virtual void SetNeedsCommit() OVERRIDE; |
54 virtual void SetNeedsRedraw(gfx::Rect damage_rect) OVERRIDE; | 54 virtual void SetNeedsRedraw(gfx::Rect damage_rect) OVERRIDE; |
| 55 virtual void SetNextCommitWaitsForActivation() OVERRIDE; |
55 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; | 56 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; |
56 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; | 57 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; |
57 virtual bool CommitRequested() const OVERRIDE; | 58 virtual bool CommitRequested() const OVERRIDE; |
58 virtual void MainThreadHasStoppedFlinging() OVERRIDE; | 59 virtual void MainThreadHasStoppedFlinging() OVERRIDE; |
59 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE; | 60 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE; |
60 virtual void Stop() OVERRIDE; | 61 virtual void Stop() OVERRIDE; |
61 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; | 62 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; |
62 virtual void AcquireLayerTextures() OVERRIDE; | 63 virtual void AcquireLayerTextures() OVERRIDE; |
63 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; | 64 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; |
64 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; | 65 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 bool started_; | 197 bool started_; |
197 bool textures_acquired_; | 198 bool textures_acquired_; |
198 bool in_composite_and_readback_; | 199 bool in_composite_and_readback_; |
199 bool manage_tiles_pending_; | 200 bool manage_tiles_pending_; |
200 // Weak pointer to use when posting tasks to the impl thread. | 201 // Weak pointer to use when posting tasks to the impl thread. |
201 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 202 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
202 // Holds the first output surface passed from Start. Should not be used for | 203 // Holds the first output surface passed from Start. Should not be used for |
203 // anything else. | 204 // anything else. |
204 scoped_ptr<OutputSurface> first_output_surface_; | 205 scoped_ptr<OutputSurface> first_output_surface_; |
205 | 206 |
| 207 // Accessed on the main thread, or when main thread is blocked. |
| 208 bool commit_waits_for_activation_; |
| 209 bool inside_commit_; |
| 210 |
206 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; | 211 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; |
207 | 212 |
208 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 213 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
209 base::WeakPtrFactory<ThreadProxy> weak_factory_; | 214 base::WeakPtrFactory<ThreadProxy> weak_factory_; |
210 | 215 |
211 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 216 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
212 | 217 |
213 scoped_ptr<Scheduler> scheduler_on_impl_thread_; | 218 scoped_ptr<Scheduler> scheduler_on_impl_thread_; |
214 | 219 |
215 // Set when the main thread is waiting on a | 220 // Set when the main thread is waiting on a |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // activation_duration_history_. | 265 // activation_duration_history_. |
261 base::TimeTicks begin_frame_sent_to_main_thread_time_; | 266 base::TimeTicks begin_frame_sent_to_main_thread_time_; |
262 base::TimeTicks commit_complete_time_; | 267 base::TimeTicks commit_complete_time_; |
263 | 268 |
264 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 269 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
265 }; | 270 }; |
266 | 271 |
267 } // namespace cc | 272 } // namespace cc |
268 | 273 |
269 #endif // CC_TREES_THREAD_PROXY_H_ | 274 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |