| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 OFF_CONTENT | 93 OFF_CONTENT |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 // LayerTreeHost->Proxy callback interface. | 96 // LayerTreeHost->Proxy callback interface. |
| 97 class LayerTreeHostImplClient { | 97 class LayerTreeHostImplClient { |
| 98 public: | 98 public: |
| 99 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; | 99 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; |
| 100 virtual void DidLoseOutputSurfaceOnImplThread() = 0; | 100 virtual void DidLoseOutputSurfaceOnImplThread() = 0; |
| 101 virtual void CommitVSyncParameters(base::TimeTicks timebase, | 101 virtual void CommitVSyncParameters(base::TimeTicks timebase, |
| 102 base::TimeDelta interval) = 0; | 102 base::TimeDelta interval) = 0; |
| 103 virtual void SetBeginFrameSource(BeginFrameSource* source) = 0; |
| 103 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) = 0; | 104 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) = 0; |
| 104 virtual void DidSwapBuffersOnImplThread() = 0; | 105 virtual void DidSwapBuffersOnImplThread() = 0; |
| 105 virtual void DidSwapBuffersCompleteOnImplThread() = 0; | 106 virtual void DidSwapBuffersCompleteOnImplThread() = 0; |
| 106 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 107 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
| 107 virtual void NotifyReadyToActivate() = 0; | 108 virtual void NotifyReadyToActivate() = 0; |
| 108 virtual void NotifyReadyToDraw() = 0; | 109 virtual void NotifyReadyToDraw() = 0; |
| 109 // Please call these 3 functions through | 110 // Please call these 3 functions through |
| 110 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and | 111 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and |
| 111 // SetNeedsOneBeginImplFrame(). | 112 // SetNeedsOneBeginImplFrame(). |
| 112 virtual void SetNeedsRedrawOnImplThread() = 0; | 113 virtual void SetNeedsRedrawOnImplThread() = 0; |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 void SetNeedsRedrawForScrollbarAnimation() override; | 349 void SetNeedsRedrawForScrollbarAnimation() override; |
| 349 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override; | 350 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override; |
| 350 | 351 |
| 351 // VideoBeginFrameSource implementation. | 352 // VideoBeginFrameSource implementation. |
| 352 void AddVideoFrameController(VideoFrameController* controller) override; | 353 void AddVideoFrameController(VideoFrameController* controller) override; |
| 353 void RemoveVideoFrameController(VideoFrameController* controller) override; | 354 void RemoveVideoFrameController(VideoFrameController* controller) override; |
| 354 | 355 |
| 355 // OutputSurfaceClient implementation. | 356 // OutputSurfaceClient implementation. |
| 356 void CommitVSyncParameters(base::TimeTicks timebase, | 357 void CommitVSyncParameters(base::TimeTicks timebase, |
| 357 base::TimeDelta interval) override; | 358 base::TimeDelta interval) override; |
| 359 void SetBeginFrameSource(BeginFrameSource* source) override; |
| 358 void SetNeedsRedrawRect(const gfx::Rect& rect) override; | 360 void SetNeedsRedrawRect(const gfx::Rect& rect) override; |
| 359 void SetExternalTilePriorityConstraints( | 361 void SetExternalTilePriorityConstraints( |
| 360 const gfx::Rect& viewport_rect, | 362 const gfx::Rect& viewport_rect, |
| 361 const gfx::Transform& transform) override; | 363 const gfx::Transform& transform) override; |
| 362 void DidLoseOutputSurface() override; | 364 void DidLoseOutputSurface() override; |
| 363 void DidSwapBuffers() override; | 365 void DidSwapBuffers() override; |
| 364 void DidSwapBuffersComplete() override; | 366 void DidSwapBuffersComplete() override; |
| 365 void ReclaimResources(const CompositorFrameAck* ack) override; | 367 void ReclaimResources(const CompositorFrameAck* ack) override; |
| 366 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; | 368 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; |
| 367 void SetTreeActivationCallback(const base::Closure& callback) override; | 369 void SetTreeActivationCallback(const base::Closure& callback) override; |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 std::unique_ptr<Viewport> viewport_; | 871 std::unique_ptr<Viewport> viewport_; |
| 870 | 872 |
| 871 LayerTreeMutator* mutator_; | 873 LayerTreeMutator* mutator_; |
| 872 | 874 |
| 873 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 875 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 874 }; | 876 }; |
| 875 | 877 |
| 876 } // namespace cc | 878 } // namespace cc |
| 877 | 879 |
| 878 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 880 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |