| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 virtual void WillPrepareTiles() = 0; | 114 virtual void WillPrepareTiles() = 0; |
| 115 virtual void DidPrepareTiles() = 0; | 115 virtual void DidPrepareTiles() = 0; |
| 116 | 116 |
| 117 // Called when page scale animation has completed on the impl thread. | 117 // Called when page scale animation has completed on the impl thread. |
| 118 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; | 118 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; |
| 119 | 119 |
| 120 // Called when output surface asks for a draw. | 120 // Called when output surface asks for a draw. |
| 121 virtual void OnDrawForCompositorFrameSink( | 121 virtual void OnDrawForCompositorFrameSink( |
| 122 bool resourceless_software_draw) = 0; | 122 bool resourceless_software_draw) = 0; |
| 123 | 123 |
| 124 virtual void NeedsImplSideInvalidation() = 0; |
| 125 |
| 124 protected: | 126 protected: |
| 125 virtual ~LayerTreeHostImplClient() {} | 127 virtual ~LayerTreeHostImplClient() {} |
| 126 }; | 128 }; |
| 127 | 129 |
| 128 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering | 130 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering |
| 129 // state. | 131 // state. |
| 130 class CC_EXPORT LayerTreeHostImpl | 132 class CC_EXPORT LayerTreeHostImpl |
| 131 : public InputHandler, | 133 : public InputHandler, |
| 132 public TileManagerClient, | 134 public TileManagerClient, |
| 133 public CompositorFrameSinkClient, | 135 public CompositorFrameSinkClient, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 virtual void UpdateAnimationState(bool start_ready_animations); | 244 virtual void UpdateAnimationState(bool start_ready_animations); |
| 243 bool Mutate(base::TimeTicks monotonic_time); | 245 bool Mutate(base::TimeTicks monotonic_time); |
| 244 void ActivateAnimations(); | 246 void ActivateAnimations(); |
| 245 void Animate(); | 247 void Animate(); |
| 246 void AnimatePendingTreeAfterCommit(); | 248 void AnimatePendingTreeAfterCommit(); |
| 247 void MainThreadHasStoppedFlinging(); | 249 void MainThreadHasStoppedFlinging(); |
| 248 void DidAnimateScrollOffset(); | 250 void DidAnimateScrollOffset(); |
| 249 void SetFullViewportDamage(); | 251 void SetFullViewportDamage(); |
| 250 void SetViewportDamage(const gfx::Rect& damage_rect); | 252 void SetViewportDamage(const gfx::Rect& damage_rect); |
| 251 | 253 |
| 254 void RunImplSideInvalidation(); |
| 255 |
| 252 void SetTreeLayerFilterMutated(ElementId element_id, | 256 void SetTreeLayerFilterMutated(ElementId element_id, |
| 253 LayerTreeImpl* tree, | 257 LayerTreeImpl* tree, |
| 254 const FilterOperations& filters); | 258 const FilterOperations& filters); |
| 255 void SetTreeLayerOpacityMutated(ElementId element_id, | 259 void SetTreeLayerOpacityMutated(ElementId element_id, |
| 256 LayerTreeImpl* tree, | 260 LayerTreeImpl* tree, |
| 257 float opacity); | 261 float opacity); |
| 258 void SetTreeLayerTransformMutated(ElementId element_id, | 262 void SetTreeLayerTransformMutated(ElementId element_id, |
| 259 LayerTreeImpl* tree, | 263 LayerTreeImpl* tree, |
| 260 const gfx::Transform& transform); | 264 const gfx::Transform& transform); |
| 261 void SetTreeLayerScrollOffsetMutated(ElementId element_id, | 265 void SetTreeLayerScrollOffsetMutated(ElementId element_id, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 void NotifyReadyToDraw() override; | 340 void NotifyReadyToDraw() override; |
| 337 void NotifyAllTileTasksCompleted() override; | 341 void NotifyAllTileTasksCompleted() override; |
| 338 void NotifyTileStateChanged(const Tile* tile) override; | 342 void NotifyTileStateChanged(const Tile* tile) override; |
| 339 std::unique_ptr<RasterTilePriorityQueue> BuildRasterQueue( | 343 std::unique_ptr<RasterTilePriorityQueue> BuildRasterQueue( |
| 340 TreePriority tree_priority, | 344 TreePriority tree_priority, |
| 341 RasterTilePriorityQueue::Type type) override; | 345 RasterTilePriorityQueue::Type type) override; |
| 342 std::unique_ptr<EvictionTilePriorityQueue> BuildEvictionQueue( | 346 std::unique_ptr<EvictionTilePriorityQueue> BuildEvictionQueue( |
| 343 TreePriority tree_priority) override; | 347 TreePriority tree_priority) override; |
| 344 void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) override; | 348 void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) override; |
| 345 gfx::ColorSpace GetTileColorSpace() const override; | 349 gfx::ColorSpace GetTileColorSpace() const override; |
| 350 void RequestImplSideInvalidation() override; |
| 346 | 351 |
| 347 // ScrollbarAnimationControllerClient implementation. | 352 // ScrollbarAnimationControllerClient implementation. |
| 348 void PostDelayedScrollbarAnimationTask(const base::Closure& task, | 353 void PostDelayedScrollbarAnimationTask(const base::Closure& task, |
| 349 base::TimeDelta delay) override; | 354 base::TimeDelta delay) override; |
| 350 void SetNeedsAnimateForScrollbarAnimation() override; | 355 void SetNeedsAnimateForScrollbarAnimation() override; |
| 351 void SetNeedsRedrawForScrollbarAnimation() override; | 356 void SetNeedsRedrawForScrollbarAnimation() override; |
| 352 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override; | 357 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override; |
| 353 void DidChangeScrollbarVisibility() override; | 358 void DidChangeScrollbarVisibility() override; |
| 354 | 359 |
| 355 // VideoBeginFrameSource implementation. | 360 // VideoBeginFrameSource implementation. |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 ScrollTree* scroll_tree); | 627 ScrollTree* scroll_tree); |
| 623 | 628 |
| 624 void CleanUpTileManagerAndUIResources(); | 629 void CleanUpTileManagerAndUIResources(); |
| 625 void CreateTileManagerResources(); | 630 void CreateTileManagerResources(); |
| 626 void ReleaseTreeResources(); | 631 void ReleaseTreeResources(); |
| 627 void ReleaseTileResources(); | 632 void ReleaseTileResources(); |
| 628 void RecreateTileResources(); | 633 void RecreateTileResources(); |
| 629 | 634 |
| 630 void AnimateInternal(bool active_tree); | 635 void AnimateInternal(bool active_tree); |
| 631 | 636 |
| 637 void AddImplSideInvalidationToSyncTree(); |
| 638 |
| 632 // Returns true if status changed. | 639 // Returns true if status changed. |
| 633 bool UpdateGpuRasterizationStatus(); | 640 bool UpdateGpuRasterizationStatus(); |
| 634 void UpdateTreeResourcesForGpuRasterizationIfNeeded(); | 641 void UpdateTreeResourcesForGpuRasterizationIfNeeded(); |
| 635 | 642 |
| 636 Viewport* viewport() const { return viewport_.get(); } | 643 Viewport* viewport() const { return viewport_.get(); } |
| 637 | 644 |
| 638 InputHandler::ScrollStatus ScrollBeginImpl( | 645 InputHandler::ScrollStatus ScrollBeginImpl( |
| 639 ScrollState* scroll_state, | 646 ScrollState* scroll_state, |
| 640 LayerImpl* scrolling_layer_impl, | 647 LayerImpl* scrolling_layer_impl, |
| 641 InputHandler::ScrollInputType type); | 648 InputHandler::ScrollInputType type); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 | 827 |
| 821 std::unique_ptr<PendingTreeDurationHistogramTimer> | 828 std::unique_ptr<PendingTreeDurationHistogramTimer> |
| 822 pending_tree_duration_timer_; | 829 pending_tree_duration_timer_; |
| 823 | 830 |
| 824 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 831 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 825 }; | 832 }; |
| 826 | 833 |
| 827 } // namespace cc | 834 } // namespace cc |
| 828 | 835 |
| 829 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 836 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |