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 <bitset> | 10 #include <bitset> |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 OFF_VIEWPORT, | 92 OFF_VIEWPORT, |
93 MSAA_CONTENT, | 93 MSAA_CONTENT, |
94 OFF_CONTENT | 94 OFF_CONTENT |
95 }; | 95 }; |
96 | 96 |
97 // LayerTreeHost->Proxy callback interface. | 97 // LayerTreeHost->Proxy callback interface. |
98 class LayerTreeHostImplClient { | 98 class LayerTreeHostImplClient { |
99 public: | 99 public: |
100 virtual void DidLoseCompositorFrameSinkOnImplThread() = 0; | 100 virtual void DidLoseCompositorFrameSinkOnImplThread() = 0; |
101 virtual void SetBeginFrameSource(BeginFrameSource* source) = 0; | 101 virtual void SetBeginFrameSource(BeginFrameSource* source) = 0; |
102 virtual void DidSwapBuffersCompleteOnImplThread() = 0; | 102 virtual void DidReceiveCompositorFrameAckOnImplThread() = 0; |
103 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 103 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
104 virtual void NotifyReadyToActivate() = 0; | 104 virtual void NotifyReadyToActivate() = 0; |
105 virtual void NotifyReadyToDraw() = 0; | 105 virtual void NotifyReadyToDraw() = 0; |
106 // Please call these 2 functions through | 106 // Please call these 2 functions through |
107 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsOneBeginImplFrame(). | 107 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsOneBeginImplFrame(). |
108 virtual void SetNeedsRedrawOnImplThread() = 0; | 108 virtual void SetNeedsRedrawOnImplThread() = 0; |
109 virtual void SetNeedsOneBeginImplFrameOnImplThread() = 0; | 109 virtual void SetNeedsOneBeginImplFrameOnImplThread() = 0; |
110 virtual void SetNeedsCommitOnImplThread() = 0; | 110 virtual void SetNeedsCommitOnImplThread() = 0; |
111 virtual void SetNeedsPrepareTilesOnImplThread() = 0; | 111 virtual void SetNeedsPrepareTilesOnImplThread() = 0; |
112 virtual void SetVideoNeedsBeginFrames(bool needs_begin_frames) = 0; | 112 virtual void SetVideoNeedsBeginFrames(bool needs_begin_frames) = 0; |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 // VideoBeginFrameSource implementation. | 359 // VideoBeginFrameSource implementation. |
360 void AddVideoFrameController(VideoFrameController* controller) override; | 360 void AddVideoFrameController(VideoFrameController* controller) override; |
361 void RemoveVideoFrameController(VideoFrameController* controller) override; | 361 void RemoveVideoFrameController(VideoFrameController* controller) override; |
362 | 362 |
363 // CompositorFrameSinkClient implementation. | 363 // CompositorFrameSinkClient implementation. |
364 void SetBeginFrameSource(BeginFrameSource* source) override; | 364 void SetBeginFrameSource(BeginFrameSource* source) override; |
365 void SetExternalTilePriorityConstraints( | 365 void SetExternalTilePriorityConstraints( |
366 const gfx::Rect& viewport_rect, | 366 const gfx::Rect& viewport_rect, |
367 const gfx::Transform& transform) override; | 367 const gfx::Transform& transform) override; |
368 void DidLoseCompositorFrameSink() override; | 368 void DidLoseCompositorFrameSink() override; |
369 void DidSwapBuffersComplete() override; | 369 void DidReceiveCompositorFrameAck() override; |
370 void ReclaimResources(const ReturnedResourceArray& resources) override; | 370 void ReclaimResources(const ReturnedResourceArray& resources) override; |
371 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; | 371 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; |
372 void SetTreeActivationCallback(const base::Closure& callback) override; | 372 void SetTreeActivationCallback(const base::Closure& callback) override; |
373 void OnDraw(const gfx::Transform& transform, | 373 void OnDraw(const gfx::Transform& transform, |
374 const gfx::Rect& viewport, | 374 const gfx::Rect& viewport, |
375 bool resourceless_software_draw) override; | 375 bool resourceless_software_draw) override; |
376 | 376 |
377 // LayerTreeMutatorClient. | 377 // LayerTreeMutatorClient. |
378 void SetNeedsMutate() override; | 378 void SetNeedsMutate() override; |
379 | 379 |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 | 840 |
841 std::unique_ptr<PendingTreeDurationHistogramTimer> | 841 std::unique_ptr<PendingTreeDurationHistogramTimer> |
842 pending_tree_duration_timer_; | 842 pending_tree_duration_timer_; |
843 | 843 |
844 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 844 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
845 }; | 845 }; |
846 | 846 |
847 } // namespace cc | 847 } // namespace cc |
848 | 848 |
849 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 849 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |