| 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_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 Loading... |
| 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 | |
| 127 protected: | 124 protected: |
| 128 virtual ~LayerTreeHostImplClient() {} | 125 virtual ~LayerTreeHostImplClient() {} |
| 129 }; | 126 }; |
| 130 | 127 |
| 131 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering | 128 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering |
| 132 // state. | 129 // state. |
| 133 class CC_EXPORT LayerTreeHostImpl | 130 class CC_EXPORT LayerTreeHostImpl |
| 134 : public InputHandler, | 131 : public InputHandler, |
| 135 public RendererClient, | 132 public RendererClient, |
| 136 public TileManagerClient, | 133 public TileManagerClient, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 const gfx::Rect& clip, | 288 const gfx::Rect& clip, |
| 292 const gfx::Rect& viewport_rect_for_tile_priority, | 289 const gfx::Rect& viewport_rect_for_tile_priority, |
| 293 const gfx::Transform& transform_for_tile_priority, | 290 const gfx::Transform& transform_for_tile_priority, |
| 294 bool resourceless_software_draw) override; | 291 bool resourceless_software_draw) override; |
| 295 void DidLoseOutputSurface() override; | 292 void DidLoseOutputSurface() override; |
| 296 void DidSwapBuffers() override; | 293 void DidSwapBuffers() override; |
| 297 void DidSwapBuffersComplete() override; | 294 void DidSwapBuffersComplete() override; |
| 298 void ReclaimResources(const CompositorFrameAck* ack) override; | 295 void ReclaimResources(const CompositorFrameAck* ack) override; |
| 299 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; | 296 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; |
| 300 void SetTreeActivationCallback(const base::Closure& callback) override; | 297 void SetTreeActivationCallback(const base::Closure& callback) override; |
| 301 void OnDraw() override; | |
| 302 | 298 |
| 303 // Called from LayerTreeImpl. | 299 // Called from LayerTreeImpl. |
| 304 void OnCanDrawStateChangedForTree(); | 300 void OnCanDrawStateChangedForTree(); |
| 305 | 301 |
| 306 // Implementation. | 302 // Implementation. |
| 307 int id() const { return id_; } | 303 int id() const { return id_; } |
| 308 bool CanDraw() const; | 304 bool CanDraw() const; |
| 309 OutputSurface* output_surface() const { return output_surface_.get(); } | 305 OutputSurface* output_surface() const { return output_surface_.get(); } |
| 310 | 306 |
| 311 std::string LayerTreeAsJson() const; | 307 std::string LayerTreeAsJson() const; |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 755 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
| 760 | 756 |
| 761 scoped_ptr<Viewport> viewport_; | 757 scoped_ptr<Viewport> viewport_; |
| 762 | 758 |
| 763 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 759 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 764 }; | 760 }; |
| 765 | 761 |
| 766 } // namespace cc | 762 } // namespace cc |
| 767 | 763 |
| 768 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 764 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |