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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and | 103 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and |
104 // SetNeedsAnimate(). | 104 // SetNeedsAnimate(). |
105 virtual void SetNeedsRedrawOnImplThread() = 0; | 105 virtual void SetNeedsRedrawOnImplThread() = 0; |
106 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; | 106 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; |
107 virtual void SetNeedsAnimateOnImplThread() = 0; | 107 virtual void SetNeedsAnimateOnImplThread() = 0; |
108 virtual void SetNeedsCommitOnImplThread() = 0; | 108 virtual void SetNeedsCommitOnImplThread() = 0; |
109 virtual void SetNeedsPrepareTilesOnImplThread() = 0; | 109 virtual void SetNeedsPrepareTilesOnImplThread() = 0; |
110 virtual void SetVideoNeedsBeginFrames(bool needs_begin_frames) = 0; | 110 virtual void SetVideoNeedsBeginFrames(bool needs_begin_frames) = 0; |
111 virtual void PostAnimationEventsToMainThreadOnImplThread( | 111 virtual void PostAnimationEventsToMainThreadOnImplThread( |
112 scoped_ptr<AnimationEventsVector> events) = 0; | 112 scoped_ptr<AnimationEventsVector> events) = 0; |
113 // Returns true if resources were deleted by this call. | |
114 virtual bool ReduceContentsTextureMemoryOnImplThread( | |
115 size_t limit_bytes, | |
116 int priority_cutoff) = 0; | |
117 virtual bool IsInsideDraw() = 0; | 113 virtual bool IsInsideDraw() = 0; |
118 virtual void RenewTreePriority() = 0; | 114 virtual void RenewTreePriority() = 0; |
119 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, | 115 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, |
120 base::TimeDelta delay) = 0; | 116 base::TimeDelta delay) = 0; |
121 virtual void DidActivateSyncTree() = 0; | 117 virtual void DidActivateSyncTree() = 0; |
122 virtual void DidPrepareTiles() = 0; | 118 virtual void DidPrepareTiles() = 0; |
123 | 119 |
124 // Called when page scale animation has completed on the impl thread. | 120 // Called when page scale animation has completed on the impl thread. |
125 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; | 121 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; |
126 | 122 |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 LayerImpl* FindScrollLayerForDeviceViewportPoint( | 620 LayerImpl* FindScrollLayerForDeviceViewportPoint( |
625 const gfx::PointF& device_viewport_point, | 621 const gfx::PointF& device_viewport_point, |
626 InputHandler::ScrollInputType type, | 622 InputHandler::ScrollInputType type, |
627 LayerImpl* layer_hit_by_point, | 623 LayerImpl* layer_hit_by_point, |
628 bool* scroll_on_main_thread, | 624 bool* scroll_on_main_thread, |
629 bool* optional_has_ancestor_scroll_handler) const; | 625 bool* optional_has_ancestor_scroll_handler) const; |
630 float DeviceSpaceDistanceToLayer(const gfx::PointF& device_viewport_point, | 626 float DeviceSpaceDistanceToLayer(const gfx::PointF& device_viewport_point, |
631 LayerImpl* layer_impl); | 627 LayerImpl* layer_impl); |
632 void StartScrollbarFadeRecursive(LayerImpl* layer); | 628 void StartScrollbarFadeRecursive(LayerImpl* layer); |
633 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy); | 629 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy); |
634 void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy); | |
635 | 630 |
636 void MarkUIResourceNotEvicted(UIResourceId uid); | 631 void MarkUIResourceNotEvicted(UIResourceId uid); |
637 | 632 |
638 void NotifySwapPromiseMonitorsOfSetNeedsRedraw(); | 633 void NotifySwapPromiseMonitorsOfSetNeedsRedraw(); |
639 void NotifySwapPromiseMonitorsOfForwardingToMainThread(); | 634 void NotifySwapPromiseMonitorsOfForwardingToMainThread(); |
640 | 635 |
641 void ScrollAnimationCreate(LayerImpl* layer_impl, | 636 void ScrollAnimationCreate(LayerImpl* layer_impl, |
642 const gfx::ScrollOffset& target_offset, | 637 const gfx::ScrollOffset& target_offset, |
643 const gfx::ScrollOffset& current_offset); | 638 const gfx::ScrollOffset& current_offset); |
644 bool ScrollAnimationUpdateTarget(LayerImpl* layer_impl, | 639 bool ScrollAnimationUpdateTarget(LayerImpl* layer_impl, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 769 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
775 | 770 |
776 scoped_ptr<Viewport> viewport_; | 771 scoped_ptr<Viewport> viewport_; |
777 | 772 |
778 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 773 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
779 }; | 774 }; |
780 | 775 |
781 } // namespace cc | 776 } // namespace cc |
782 | 777 |
783 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 778 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |