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