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

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

Issue 817603002: cc: Make scheduling be driven by vsync for android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase compile errors. Created 5 years, 8 months 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
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_LAYER_TREE_HOST_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 virtual bool IsInsideDraw() = 0; 114 virtual bool IsInsideDraw() = 0;
115 virtual void RenewTreePriority() = 0; 115 virtual void RenewTreePriority() = 0;
116 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, 116 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
117 base::TimeDelta delay) = 0; 117 base::TimeDelta delay) = 0;
118 virtual void DidActivateSyncTree() = 0; 118 virtual void DidActivateSyncTree() = 0;
119 virtual void DidPrepareTiles() = 0; 119 virtual void DidPrepareTiles() = 0;
120 120
121 // Called when page scale animation has completed on the impl thread. 121 // Called when page scale animation has completed on the impl thread.
122 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; 122 virtual void DidCompletePageScaleAnimationOnImplThread() = 0;
123 123
124 // Called when output surface asks for a draw.
125 virtual void OnDrawForOutputSurface() = 0;
126
124 protected: 127 protected:
125 virtual ~LayerTreeHostImplClient() {} 128 virtual ~LayerTreeHostImplClient() {}
126 }; 129 };
127 130
128 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering 131 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering
129 // state. 132 // state.
130 class CC_EXPORT LayerTreeHostImpl 133 class CC_EXPORT LayerTreeHostImpl
131 : public InputHandler, 134 : public InputHandler,
132 public RendererClient, 135 public RendererClient,
133 public TileManagerClient, 136 public TileManagerClient,
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 const gfx::Rect& clip, 291 const gfx::Rect& clip,
289 const gfx::Rect& viewport_rect_for_tile_priority, 292 const gfx::Rect& viewport_rect_for_tile_priority,
290 const gfx::Transform& transform_for_tile_priority, 293 const gfx::Transform& transform_for_tile_priority,
291 bool resourceless_software_draw) override; 294 bool resourceless_software_draw) override;
292 void DidLoseOutputSurface() override; 295 void DidLoseOutputSurface() override;
293 void DidSwapBuffers() override; 296 void DidSwapBuffers() override;
294 void DidSwapBuffersComplete() override; 297 void DidSwapBuffersComplete() override;
295 void ReclaimResources(const CompositorFrameAck* ack) override; 298 void ReclaimResources(const CompositorFrameAck* ack) override;
296 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; 299 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
297 void SetTreeActivationCallback(const base::Closure& callback) override; 300 void SetTreeActivationCallback(const base::Closure& callback) override;
301 void OnDraw() override;
298 302
299 // Called from LayerTreeImpl. 303 // Called from LayerTreeImpl.
300 void OnCanDrawStateChangedForTree(); 304 void OnCanDrawStateChangedForTree();
301 305
302 // Implementation. 306 // Implementation.
303 int id() const { return id_; } 307 int id() const { return id_; }
304 bool CanDraw() const; 308 bool CanDraw() const;
305 OutputSurface* output_surface() const { return output_surface_.get(); } 309 OutputSurface* output_surface() const { return output_surface_.get(); }
306 310
307 std::string LayerTreeAsJson() const; 311 std::string LayerTreeAsJson() const;
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; 759 scoped_ptr<FrameTimingTracker> frame_timing_tracker_;
756 760
757 scoped_ptr<Viewport> viewport_; 761 scoped_ptr<Viewport> viewport_;
758 762
759 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 763 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
760 }; 764 };
761 765
762 } // namespace cc 766 } // namespace cc
763 767
764 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 768 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698