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 30 matching lines...) Expand all Loading... |
41 virtual ~ThreadProxy(); | 41 virtual ~ThreadProxy(); |
42 | 42 |
43 // Proxy implementation | 43 // Proxy implementation |
44 virtual bool CompositeAndReadback(void* pixels, gfx::Rect rect) OVERRIDE; | 44 virtual bool CompositeAndReadback(void* pixels, gfx::Rect rect) OVERRIDE; |
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; | |
52 virtual void SetNeedsUpdateLayers() OVERRIDE; | 51 virtual void SetNeedsUpdateLayers() OVERRIDE; |
53 virtual void SetNeedsCommit() OVERRIDE; | 52 virtual void SetNeedsCommit() OVERRIDE; |
54 virtual void SetNeedsRedraw(gfx::Rect damage_rect) OVERRIDE; | 53 virtual void SetNeedsRedraw(gfx::Rect damage_rect) OVERRIDE; |
55 virtual void SetNextCommitWaitsForActivation() OVERRIDE; | 54 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 bool BeginMainFrameRequested() const OVERRIDE; | 58 virtual bool BeginMainFrameRequested() const OVERRIDE; |
60 virtual void MainThreadHasStoppedFlinging() OVERRIDE; | 59 virtual void MainThreadHasStoppedFlinging() OVERRIDE; |
61 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE; | 60 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 void AsValueOnImplThread(CompletionEvent* completion, | 188 void AsValueOnImplThread(CompletionEvent* completion, |
190 base::DictionaryValue* state) const; | 189 base::DictionaryValue* state) const; |
191 void RenewTreePriorityOnImplThread(); | 190 void RenewTreePriorityOnImplThread(); |
192 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); | 191 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); |
193 void StartScrollbarAnimationOnImplThread(); | 192 void StartScrollbarAnimationOnImplThread(); |
194 void MainThreadHasStoppedFlingingOnImplThread(); | 193 void MainThreadHasStoppedFlingingOnImplThread(); |
195 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); | 194 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); |
196 | 195 |
197 // Accessed on main thread only. | 196 // Accessed on main thread only. |
198 | 197 |
199 // Set only when SetNeedsAnimate is called. | 198 // Set only when SetNeedsUpdateLayers is called. |
200 bool animate_requested_; | 199 bool update_requested_; |
201 // Set only when SetNeedsCommit is called. | 200 // Set only when SetNeedsCommit is called. |
202 bool commit_requested_; | 201 bool commit_requested_; |
203 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. | 202 // Set by both SetNeedsUpdateLayers and SetNeedsCommit. |
204 bool commit_request_sent_to_impl_thread_; | 203 bool commit_request_sent_to_impl_thread_; |
205 // Set by BeginMainFrame | 204 // Set by BeginMainFrame |
206 bool created_offscreen_context_provider_; | 205 bool created_offscreen_context_provider_; |
207 base::CancelableClosure output_surface_creation_callback_; | 206 base::CancelableClosure output_surface_creation_callback_; |
208 LayerTreeHost* layer_tree_host_; | 207 LayerTreeHost* layer_tree_host_; |
209 RendererCapabilities renderer_capabilities_main_thread_copy_; | 208 RendererCapabilities renderer_capabilities_main_thread_copy_; |
210 bool started_; | 209 bool started_; |
211 bool textures_acquired_; | 210 bool textures_acquired_; |
212 bool in_composite_and_readback_; | 211 bool in_composite_and_readback_; |
213 bool manage_tiles_pending_; | 212 bool manage_tiles_pending_; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 276 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
278 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; | 277 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; |
279 base::WeakPtrFactory<ThreadProxy> weak_factory_; | 278 base::WeakPtrFactory<ThreadProxy> weak_factory_; |
280 | 279 |
281 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 280 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
282 }; | 281 }; |
283 | 282 |
284 } // namespace cc | 283 } // namespace cc |
285 | 284 |
286 #endif // CC_TREES_THREAD_PROXY_H_ | 285 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |