Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: cc/trees/thread_proxy.h

Issue 68893031: Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed cc animation unittest Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 void StartScrollbarAnimationOnImplThread(); 194 void StartScrollbarAnimationOnImplThread();
196 void MainThreadHasStoppedFlingingOnImplThread(); 195 void MainThreadHasStoppedFlingingOnImplThread();
197 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); 196 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled);
198 LayerTreeHost* layer_tree_host(); 197 LayerTreeHost* layer_tree_host();
199 const LayerTreeHost* layer_tree_host() const; 198 const LayerTreeHost* layer_tree_host() const;
200 PrioritizedResourceManager* contents_texture_manager_on_main_thread(); 199 PrioritizedResourceManager* contents_texture_manager_on_main_thread();
201 PrioritizedResourceManager* contents_texture_manager_on_impl_thread(); 200 PrioritizedResourceManager* contents_texture_manager_on_impl_thread();
202 201
203 // Accessed on main thread only. 202 // Accessed on main thread only.
204 203
205 // Set only when SetNeedsAnimate is called. 204 // Set only when SetNeedsUpdateLayers is called.
206 bool animate_requested_; 205 bool update_requested_;
207 // Set only when SetNeedsCommit is called. 206 // Set only when SetNeedsCommit is called.
208 bool commit_requested_; 207 bool commit_requested_;
209 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. 208 // Set by both SetNeedsUpdateLayers and SetNeedsCommit.
210 bool commit_request_sent_to_impl_thread_; 209 bool commit_request_sent_to_impl_thread_;
211 // Set by BeginMainFrame 210 // Set by BeginMainFrame
212 bool created_offscreen_context_provider_; 211 bool created_offscreen_context_provider_;
213 base::CancelableClosure output_surface_creation_callback_; 212 base::CancelableClosure output_surface_creation_callback_;
214 // Don't use this variable directly, go through layer_tree_host() to ensure it 213 // Don't use this variable directly, go through layer_tree_host() to ensure it
215 // is only used on the main thread or if the main thread is blocked. 214 // is only used on the main thread or if the main thread is blocked.
216 LayerTreeHost* layer_tree_host_unsafe_; 215 LayerTreeHost* layer_tree_host_unsafe_;
217 // Use one of the contents_texture_manager_on functions above instead of using 216 // Use one of the contents_texture_manager_on functions above instead of using
218 // this variable directly. 217 // this variable directly.
219 PrioritizedResourceManager* contents_texture_manager_unsafe_; 218 PrioritizedResourceManager* contents_texture_manager_unsafe_;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 base::WeakPtrFactory<ThreadProxy> weak_factory_; 289 base::WeakPtrFactory<ThreadProxy> weak_factory_;
291 290
292 const int layer_tree_host_id_; 291 const int layer_tree_host_id_;
293 292
294 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); 293 DISALLOW_COPY_AND_ASSIGN(ThreadProxy);
295 }; 294 };
296 295
297 } // namespace cc 296 } // namespace cc
298 297
299 #endif // CC_TREES_THREAD_PROXY_H_ 298 #endif // CC_TREES_THREAD_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698