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 <set> | 10 #include <set> |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 OFF_CONTENT | 88 OFF_CONTENT |
89 }; | 89 }; |
90 | 90 |
91 // LayerTreeHost->Proxy callback interface. | 91 // LayerTreeHost->Proxy callback interface. |
92 class LayerTreeHostImplClient { | 92 class LayerTreeHostImplClient { |
93 public: | 93 public: |
94 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; | 94 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; |
95 virtual void DidLoseOutputSurfaceOnImplThread() = 0; | 95 virtual void DidLoseOutputSurfaceOnImplThread() = 0; |
96 virtual void CommitVSyncParameters(base::TimeTicks timebase, | 96 virtual void CommitVSyncParameters(base::TimeTicks timebase, |
97 base::TimeDelta interval) = 0; | 97 base::TimeDelta interval) = 0; |
| 98 virtual void SetBeginFrameSource(BeginFrameSource* source) = 0; |
98 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) = 0; | 99 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) = 0; |
99 virtual void DidSwapBuffersOnImplThread() = 0; | 100 virtual void DidSwapBuffersOnImplThread() = 0; |
100 virtual void DidSwapBuffersCompleteOnImplThread() = 0; | 101 virtual void DidSwapBuffersCompleteOnImplThread() = 0; |
101 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 102 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
102 virtual void NotifyReadyToActivate() = 0; | 103 virtual void NotifyReadyToActivate() = 0; |
103 virtual void NotifyReadyToDraw() = 0; | 104 virtual void NotifyReadyToDraw() = 0; |
104 // Please call these 3 functions through | 105 // Please call these 3 functions through |
105 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and | 106 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and |
106 // SetNeedsOneBeginImplFrame(). | 107 // SetNeedsOneBeginImplFrame(). |
107 virtual void SetNeedsRedrawOnImplThread() = 0; | 108 virtual void SetNeedsRedrawOnImplThread() = 0; |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 void SetNeedsRedrawForScrollbarAnimation() override; | 343 void SetNeedsRedrawForScrollbarAnimation() override; |
343 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override; | 344 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override; |
344 | 345 |
345 // VideoBeginFrameSource implementation. | 346 // VideoBeginFrameSource implementation. |
346 void AddVideoFrameController(VideoFrameController* controller) override; | 347 void AddVideoFrameController(VideoFrameController* controller) override; |
347 void RemoveVideoFrameController(VideoFrameController* controller) override; | 348 void RemoveVideoFrameController(VideoFrameController* controller) override; |
348 | 349 |
349 // OutputSurfaceClient implementation. | 350 // OutputSurfaceClient implementation. |
350 void CommitVSyncParameters(base::TimeTicks timebase, | 351 void CommitVSyncParameters(base::TimeTicks timebase, |
351 base::TimeDelta interval) override; | 352 base::TimeDelta interval) override; |
| 353 void SetBeginFrameSource(BeginFrameSource* source) override; |
352 void SetNeedsRedrawRect(const gfx::Rect& rect) override; | 354 void SetNeedsRedrawRect(const gfx::Rect& rect) override; |
353 void SetExternalTilePriorityConstraints( | 355 void SetExternalTilePriorityConstraints( |
354 const gfx::Rect& viewport_rect, | 356 const gfx::Rect& viewport_rect, |
355 const gfx::Transform& transform) override; | 357 const gfx::Transform& transform) override; |
356 void DidLoseOutputSurface() override; | 358 void DidLoseOutputSurface() override; |
357 void DidSwapBuffers() override; | 359 void DidSwapBuffers() override; |
358 void DidSwapBuffersComplete() override; | 360 void DidSwapBuffersComplete() override; |
359 void ReclaimResources(const CompositorFrameAck* ack) override; | 361 void ReclaimResources(const CompositorFrameAck* ack) override; |
360 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; | 362 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; |
361 void SetTreeActivationCallback(const base::Closure& callback) override; | 363 void SetTreeActivationCallback(const base::Closure& callback) override; |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 850 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
849 | 851 |
850 scoped_ptr<Viewport> viewport_; | 852 scoped_ptr<Viewport> viewport_; |
851 | 853 |
852 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 854 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
853 }; | 855 }; |
854 | 856 |
855 } // namespace cc | 857 } // namespace cc |
856 | 858 |
857 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 859 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |