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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 SetNextCommitWaitsForActivation() OVERRIDE; |
56 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; | 56 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; |
57 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; | 57 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; |
58 virtual bool CommitRequested() const OVERRIDE; | 58 virtual bool CommitRequested() const OVERRIDE; |
59 virtual bool BeginMainFrameRequested() const OVERRIDE; | 59 virtual bool BeginMainFrameRequested() const OVERRIDE; |
60 virtual void MainThreadHasStoppedFlinging() OVERRIDE; | 60 virtual void MainThreadHasStoppedFlinging() OVERRIDE; |
61 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE; | 61 virtual void Start() OVERRIDE; |
62 virtual void Stop() OVERRIDE; | 62 virtual void Stop() OVERRIDE; |
63 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; | 63 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; |
64 virtual void AcquireLayerTextures() OVERRIDE; | 64 virtual void AcquireLayerTextures() OVERRIDE; |
65 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; | 65 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; |
66 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; | 66 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; |
67 virtual bool CommitPendingForTesting() OVERRIDE; | 67 virtual bool CommitPendingForTesting() OVERRIDE; |
68 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE; | 68 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE; |
69 | 69 |
70 // LayerTreeHostImplClient implementation | 70 // LayerTreeHostImplClient implementation |
71 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; | 71 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // Use one of the contents_texture_manager_on functions above instead of using | 217 // Use one of the contents_texture_manager_on functions above instead of using |
218 // this variable directly. | 218 // this variable directly. |
219 PrioritizedResourceManager* contents_texture_manager_unsafe_; | 219 PrioritizedResourceManager* contents_texture_manager_unsafe_; |
220 RendererCapabilities renderer_capabilities_main_thread_copy_; | 220 RendererCapabilities renderer_capabilities_main_thread_copy_; |
221 bool started_; | 221 bool started_; |
222 bool textures_acquired_; | 222 bool textures_acquired_; |
223 bool in_composite_and_readback_; | 223 bool in_composite_and_readback_; |
224 bool manage_tiles_pending_; | 224 bool manage_tiles_pending_; |
225 // Weak pointer to use when posting tasks to the impl thread. | 225 // Weak pointer to use when posting tasks to the impl thread. |
226 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 226 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
227 // Holds the first output surface passed from Start. Should not be used for | |
228 // anything else. | |
229 scoped_ptr<OutputSurface> first_output_surface_; | |
230 | 227 |
231 // Accessed on the main thread, or when main thread is blocked. | 228 // Accessed on the main thread, or when main thread is blocked. |
232 bool commit_waits_for_activation_; | 229 bool commit_waits_for_activation_; |
233 bool inside_commit_; | 230 bool inside_commit_; |
234 | 231 |
235 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 232 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
236 | 233 |
237 scoped_ptr<Scheduler> scheduler_on_impl_thread_; | 234 scoped_ptr<Scheduler> scheduler_on_impl_thread_; |
238 | 235 |
239 // Set when the main thread is waiting on a | 236 // Set when the main thread is waiting on a |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 base::WeakPtrFactory<ThreadProxy> weak_factory_; | 287 base::WeakPtrFactory<ThreadProxy> weak_factory_; |
291 | 288 |
292 const int layer_tree_host_id_; | 289 const int layer_tree_host_id_; |
293 | 290 |
294 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 291 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
295 }; | 292 }; |
296 | 293 |
297 } // namespace cc | 294 } // namespace cc |
298 | 295 |
299 #endif // CC_TREES_THREAD_PROXY_H_ | 296 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |