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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 SetEstimatedParentDrawTime(base::TimeDelta draw_time) = 0; | 102 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) = 0; |
103 virtual void DidSwapBuffersCompleteOnImplThread() = 0; | 103 virtual void DidSwapBuffersCompleteOnImplThread() = 0; |
104 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 104 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
105 virtual void NotifyReadyToActivate() = 0; | 105 virtual void NotifyReadyToActivate() = 0; |
106 virtual void NotifyReadyToDraw() = 0; | 106 virtual void NotifyReadyToDraw() = 0; |
107 // Please call these 3 functions through | 107 // Please call these 2 functions through |
108 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and | 108 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsOneBeginImplFrame(). |
109 // SetNeedsOneBeginImplFrame(). | |
110 virtual void SetNeedsRedrawOnImplThread() = 0; | 109 virtual void SetNeedsRedrawOnImplThread() = 0; |
111 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; | |
112 virtual void SetNeedsOneBeginImplFrameOnImplThread() = 0; | 110 virtual void SetNeedsOneBeginImplFrameOnImplThread() = 0; |
113 virtual void SetNeedsCommitOnImplThread() = 0; | 111 virtual void SetNeedsCommitOnImplThread() = 0; |
114 virtual void SetNeedsPrepareTilesOnImplThread() = 0; | 112 virtual void SetNeedsPrepareTilesOnImplThread() = 0; |
115 virtual void SetVideoNeedsBeginFrames(bool needs_begin_frames) = 0; | 113 virtual void SetVideoNeedsBeginFrames(bool needs_begin_frames) = 0; |
116 virtual void PostAnimationEventsToMainThreadOnImplThread( | 114 virtual void PostAnimationEventsToMainThreadOnImplThread( |
117 std::unique_ptr<AnimationEvents> events) = 0; | 115 std::unique_ptr<AnimationEvents> events) = 0; |
118 virtual bool IsInsideDraw() = 0; | 116 virtual bool IsInsideDraw() = 0; |
119 virtual void RenewTreePriority() = 0; | 117 virtual void RenewTreePriority() = 0; |
120 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, | 118 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, |
121 base::TimeDelta delay) = 0; | 119 base::TimeDelta delay) = 0; |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 void SetNeedsAnimateForScrollbarAnimation() override; | 359 void SetNeedsAnimateForScrollbarAnimation() override; |
362 void SetNeedsRedrawForScrollbarAnimation() override; | 360 void SetNeedsRedrawForScrollbarAnimation() override; |
363 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override; | 361 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override; |
364 | 362 |
365 // VideoBeginFrameSource implementation. | 363 // VideoBeginFrameSource implementation. |
366 void AddVideoFrameController(VideoFrameController* controller) override; | 364 void AddVideoFrameController(VideoFrameController* controller) override; |
367 void RemoveVideoFrameController(VideoFrameController* controller) override; | 365 void RemoveVideoFrameController(VideoFrameController* controller) override; |
368 | 366 |
369 // CompositorFrameSinkClient implementation. | 367 // CompositorFrameSinkClient implementation. |
370 void SetBeginFrameSource(BeginFrameSource* source) override; | 368 void SetBeginFrameSource(BeginFrameSource* source) override; |
371 void SetNeedsRedrawRect(const gfx::Rect& rect) override; | |
372 void SetExternalTilePriorityConstraints( | 369 void SetExternalTilePriorityConstraints( |
373 const gfx::Rect& viewport_rect, | 370 const gfx::Rect& viewport_rect, |
374 const gfx::Transform& transform) override; | 371 const gfx::Transform& transform) override; |
375 void DidLoseCompositorFrameSink() override; | 372 void DidLoseCompositorFrameSink() override; |
376 void DidSwapBuffersComplete() override; | 373 void DidSwapBuffersComplete() override; |
377 void DidReceiveTextureInUseResponses( | |
378 const gpu::TextureInUseResponses& responses) override; | |
379 void ReclaimResources(const ReturnedResourceArray& resources) override; | 374 void ReclaimResources(const ReturnedResourceArray& resources) override; |
380 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; | 375 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; |
381 void SetTreeActivationCallback(const base::Closure& callback) override; | 376 void SetTreeActivationCallback(const base::Closure& callback) override; |
382 void OnDraw(const gfx::Transform& transform, | 377 void OnDraw(const gfx::Transform& transform, |
383 const gfx::Rect& viewport, | 378 const gfx::Rect& viewport, |
384 bool resourceless_software_draw) override; | 379 bool resourceless_software_draw) override; |
385 | 380 |
386 // LayerTreeMutatorClient. | 381 // LayerTreeMutatorClient. |
387 void SetNeedsMutate() override; | 382 void SetNeedsMutate() override; |
388 | 383 |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 | 843 |
849 std::unique_ptr<PendingTreeDurationHistogramTimer> | 844 std::unique_ptr<PendingTreeDurationHistogramTimer> |
850 pending_tree_duration_timer_; | 845 pending_tree_duration_timer_; |
851 | 846 |
852 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 847 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
853 }; | 848 }; |
854 | 849 |
855 } // namespace cc | 850 } // namespace cc |
856 | 851 |
857 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 852 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |