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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 bool started_; | 198 bool started_; |
198 bool textures_acquired_; | 199 bool textures_acquired_; |
199 bool in_composite_and_readback_; | 200 bool in_composite_and_readback_; |
200 bool manage_tiles_pending_; | 201 bool manage_tiles_pending_; |
201 // Weak pointer to use when posting tasks to the impl thread. | 202 // Weak pointer to use when posting tasks to the impl thread. |
202 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 203 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
203 // Holds the first output surface passed from Start. Should not be used for | 204 // Holds the first output surface passed from Start. Should not be used for |
204 // anything else. | 205 // anything else. |
205 scoped_ptr<OutputSurface> first_output_surface_; | 206 scoped_ptr<OutputSurface> first_output_surface_; |
206 | 207 |
| 208 // Accessed on the main thread, or when main thread is blocked. |
| 209 bool commit_waits_for_activation_; |
| 210 bool inside_commit_; |
| 211 |
207 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; | 212 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; |
208 | 213 |
209 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 214 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
210 base::WeakPtrFactory<ThreadProxy> weak_factory_; | 215 base::WeakPtrFactory<ThreadProxy> weak_factory_; |
211 | 216 |
212 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 217 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
213 | 218 |
214 scoped_ptr<Scheduler> scheduler_on_impl_thread_; | 219 scoped_ptr<Scheduler> scheduler_on_impl_thread_; |
215 | 220 |
216 // Set when the main thread is waiting on a | 221 // Set when the main thread is waiting on a |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 // activation_duration_history_. | 266 // activation_duration_history_. |
262 base::TimeTicks begin_frame_sent_to_main_thread_time_; | 267 base::TimeTicks begin_frame_sent_to_main_thread_time_; |
263 base::TimeTicks commit_complete_time_; | 268 base::TimeTicks commit_complete_time_; |
264 | 269 |
265 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 270 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
266 }; | 271 }; |
267 | 272 |
268 } // namespace cc | 273 } // namespace cc |
269 | 274 |
270 #endif // CC_TREES_THREAD_PROXY_H_ | 275 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |