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

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: Small fix after rebase. Created 5 years, 9 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
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 virtual bool IsInsideDraw() = 0; 113 virtual bool IsInsideDraw() = 0;
114 virtual void RenewTreePriority() = 0; 114 virtual void RenewTreePriority() = 0;
115 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, 115 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
116 base::TimeDelta delay) = 0; 116 base::TimeDelta delay) = 0;
117 virtual void DidActivateSyncTree() = 0; 117 virtual void DidActivateSyncTree() = 0;
118 virtual void DidPrepareTiles() = 0; 118 virtual void DidPrepareTiles() = 0;
119 119
120 // Called when page scale animation has completed on the impl thread. 120 // Called when page scale animation has completed on the impl thread.
121 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; 121 virtual void DidCompletePageScaleAnimationOnImplThread() = 0;
122 122
123 // Called when output surface asks for a draw.
124 virtual void OnDrawForOutputSurface() = 0;
125
123 protected: 126 protected:
124 virtual ~LayerTreeHostImplClient() {} 127 virtual ~LayerTreeHostImplClient() {}
125 }; 128 };
126 129
127 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering 130 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering
128 // state. 131 // state.
129 class CC_EXPORT LayerTreeHostImpl 132 class CC_EXPORT LayerTreeHostImpl
130 : public InputHandler, 133 : public InputHandler,
131 public RendererClient, 134 public RendererClient,
132 public TileManagerClient, 135 public TileManagerClient,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 const gfx::Rect& clip, 289 const gfx::Rect& clip,
287 const gfx::Rect& viewport_rect_for_tile_priority, 290 const gfx::Rect& viewport_rect_for_tile_priority,
288 const gfx::Transform& transform_for_tile_priority, 291 const gfx::Transform& transform_for_tile_priority,
289 bool resourceless_software_draw) override; 292 bool resourceless_software_draw) override;
290 void DidLoseOutputSurface() override; 293 void DidLoseOutputSurface() override;
291 void DidSwapBuffers() override; 294 void DidSwapBuffers() override;
292 void DidSwapBuffersComplete() override; 295 void DidSwapBuffersComplete() override;
293 void ReclaimResources(const CompositorFrameAck* ack) override; 296 void ReclaimResources(const CompositorFrameAck* ack) override;
294 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; 297 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
295 void SetTreeActivationCallback(const base::Closure& callback) override; 298 void SetTreeActivationCallback(const base::Closure& callback) override;
299 void OnDraw() override;
296 300
297 // Called from LayerTreeImpl. 301 // Called from LayerTreeImpl.
298 void OnCanDrawStateChangedForTree(); 302 void OnCanDrawStateChangedForTree();
299 303
300 // Implementation. 304 // Implementation.
301 int id() const { return id_; } 305 int id() const { return id_; }
302 bool CanDraw() const; 306 bool CanDraw() const;
303 OutputSurface* output_surface() const { return output_surface_.get(); } 307 OutputSurface* output_surface() const { return output_surface_.get(); }
304 308
305 std::string LayerTreeAsJson() const; 309 std::string LayerTreeAsJson() const;
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 bool is_likely_to_require_a_draw_; 747 bool is_likely_to_require_a_draw_;
744 748
745 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; 749 scoped_ptr<FrameTimingTracker> frame_timing_tracker_;
746 750
747 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 751 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
748 }; 752 };
749 753
750 } // namespace cc 754 } // namespace cc
751 755
752 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 756 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698