| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 const gfx::Rect& clip, | 290 const gfx::Rect& clip, |
| 288 const gfx::Rect& viewport_rect_for_tile_priority, | 291 const gfx::Rect& viewport_rect_for_tile_priority, |
| 289 const gfx::Transform& transform_for_tile_priority, | 292 const gfx::Transform& transform_for_tile_priority, |
| 290 bool resourceless_software_draw) override; | 293 bool resourceless_software_draw) override; |
| 291 void DidLoseOutputSurface() override; | 294 void DidLoseOutputSurface() override; |
| 292 void DidSwapBuffers() override; | 295 void DidSwapBuffers() override; |
| 293 void DidSwapBuffersComplete() override; | 296 void DidSwapBuffersComplete() override; |
| 294 void ReclaimResources(const CompositorFrameAck* ack) override; | 297 void ReclaimResources(const CompositorFrameAck* ack) override; |
| 295 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; | 298 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; |
| 296 void SetTreeActivationCallback(const base::Closure& callback) override; | 299 void SetTreeActivationCallback(const base::Closure& callback) override; |
| 300 void OnDraw() override; |
| 297 | 301 |
| 298 // Called from LayerTreeImpl. | 302 // Called from LayerTreeImpl. |
| 299 void OnCanDrawStateChangedForTree(); | 303 void OnCanDrawStateChangedForTree(); |
| 300 | 304 |
| 301 // Implementation. | 305 // Implementation. |
| 302 int id() const { return id_; } | 306 int id() const { return id_; } |
| 303 bool CanDraw() const; | 307 bool CanDraw() const; |
| 304 OutputSurface* output_surface() const { return output_surface_.get(); } | 308 OutputSurface* output_surface() const { return output_surface_.get(); } |
| 305 | 309 |
| 306 std::string LayerTreeAsJson() const; | 310 std::string LayerTreeAsJson() const; |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 bool is_likely_to_require_a_draw_; | 750 bool is_likely_to_require_a_draw_; |
| 747 | 751 |
| 748 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 752 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
| 749 | 753 |
| 750 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 754 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 751 }; | 755 }; |
| 752 | 756 |
| 753 } // namespace cc | 757 } // namespace cc |
| 754 | 758 |
| 755 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 759 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |