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 <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 class MemoryHistory; | 50 class MemoryHistory; |
51 class PageScaleAnimation; | 51 class PageScaleAnimation; |
52 class PaintTimeCounter; | 52 class PaintTimeCounter; |
53 class PictureLayerImpl; | 53 class PictureLayerImpl; |
54 class RasterTilePriorityQueue; | 54 class RasterTilePriorityQueue; |
55 class RasterWorkerPool; | 55 class RasterWorkerPool; |
56 class RenderPassDrawQuad; | 56 class RenderPassDrawQuad; |
57 class RenderingStatsInstrumentation; | 57 class RenderingStatsInstrumentation; |
58 class ResourcePool; | 58 class ResourcePool; |
59 class ScrollbarLayerImplBase; | 59 class ScrollbarLayerImplBase; |
| 60 class TreeScrollElasticityClient; |
60 class TextureMailboxDeleter; | 61 class TextureMailboxDeleter; |
61 class TopControlsManager; | 62 class TopControlsManager; |
62 class UIResourceBitmap; | 63 class UIResourceBitmap; |
63 class UIResourceRequest; | 64 class UIResourceRequest; |
64 struct RendererCapabilitiesImpl; | 65 struct RendererCapabilitiesImpl; |
65 | 66 |
66 // LayerTreeHost->Proxy callback interface. | 67 // LayerTreeHost->Proxy callback interface. |
67 class LayerTreeHostImplClient { | 68 class LayerTreeHostImplClient { |
68 public: | 69 public: |
69 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; | 70 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 void PinchGestureBegin() override; | 150 void PinchGestureBegin() override; |
150 void PinchGestureUpdate(float magnify_delta, | 151 void PinchGestureUpdate(float magnify_delta, |
151 const gfx::Point& anchor) override; | 152 const gfx::Point& anchor) override; |
152 void PinchGestureEnd() override; | 153 void PinchGestureEnd() override; |
153 void SetNeedsAnimate() override; | 154 void SetNeedsAnimate() override; |
154 bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, | 155 bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, |
155 InputHandler::ScrollInputType type) override; | 156 InputHandler::ScrollInputType type) override; |
156 bool HaveTouchEventHandlersAt(const gfx::Point& viewport_port) override; | 157 bool HaveTouchEventHandlersAt(const gfx::Point& viewport_port) override; |
157 scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 158 scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
158 ui::LatencyInfo* latency) override; | 159 ui::LatencyInfo* latency) override; |
| 160 ScrollElasticityControllerClient* |
| 161 GetScrollElasticityControllerClient() override; |
159 | 162 |
160 // TopControlsManagerClient implementation. | 163 // TopControlsManagerClient implementation. |
161 void SetControlsTopOffset(float offset) override; | 164 void SetControlsTopOffset(float offset) override; |
162 float ControlsTopOffset() const override; | 165 float ControlsTopOffset() const override; |
163 void DidChangeTopControlsPosition() override; | 166 void DidChangeTopControlsPosition() override; |
164 bool HaveRootScrollLayer() const override; | 167 bool HaveRootScrollLayer() const override; |
165 | 168 |
166 struct CC_EXPORT FrameData : public RenderPassSink { | 169 struct CC_EXPORT FrameData : public RenderPassSink { |
167 FrameData(); | 170 FrameData(); |
168 ~FrameData() override; | 171 ~FrameData() override; |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 scoped_ptr<LayerTreeImpl> recycle_tree_; | 623 scoped_ptr<LayerTreeImpl> recycle_tree_; |
621 | 624 |
622 InputHandlerClient* input_handler_client_; | 625 InputHandlerClient* input_handler_client_; |
623 bool did_lock_scrolling_layer_; | 626 bool did_lock_scrolling_layer_; |
624 bool should_bubble_scrolls_; | 627 bool should_bubble_scrolls_; |
625 bool wheel_scrolling_; | 628 bool wheel_scrolling_; |
626 bool scroll_affects_scroll_handler_; | 629 bool scroll_affects_scroll_handler_; |
627 int scroll_layer_id_when_mouse_over_scrollbar_; | 630 int scroll_layer_id_when_mouse_over_scrollbar_; |
628 ScopedPtrVector<SwapPromise> swap_promises_for_main_thread_scroll_update_; | 631 ScopedPtrVector<SwapPromise> swap_promises_for_main_thread_scroll_update_; |
629 | 632 |
| 633 // The LayerTreeHostImpl class could implement the |
| 634 // ScrollElasticityControllerClient interface itself, but an interface |
| 635 // class is created to keep related state and functions separate. |
| 636 scoped_ptr<TreeScrollElasticityClient> scroll_elasticity_client_; |
| 637 |
630 bool tile_priorities_dirty_; | 638 bool tile_priorities_dirty_; |
631 | 639 |
632 // The optional delegate for the root layer scroll offset. | 640 // The optional delegate for the root layer scroll offset. |
633 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 641 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
634 LayerTreeSettings settings_; | 642 LayerTreeSettings settings_; |
635 LayerTreeDebugState debug_state_; | 643 LayerTreeDebugState debug_state_; |
636 bool visible_; | 644 bool visible_; |
637 ManagedMemoryPolicy cached_managed_memory_policy_; | 645 ManagedMemoryPolicy cached_managed_memory_policy_; |
638 | 646 |
639 gfx::Vector2dF accumulated_root_overscroll_; | 647 gfx::Vector2dF accumulated_root_overscroll_; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; | 725 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; |
718 | 726 |
719 bool requires_high_res_to_draw_; | 727 bool requires_high_res_to_draw_; |
720 | 728 |
721 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 729 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
722 }; | 730 }; |
723 | 731 |
724 } // namespace cc | 732 } // namespace cc |
725 | 733 |
726 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 734 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |