| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 InputHandler::ScrollStatus FlingScrollBegin() override; | 178 InputHandler::ScrollStatus FlingScrollBegin() override; |
| 179 void MouseMoveAt(const gfx::Point& viewport_point) override; | 179 void MouseMoveAt(const gfx::Point& viewport_point) override; |
| 180 void PinchGestureBegin() override; | 180 void PinchGestureBegin() override; |
| 181 void PinchGestureUpdate(float magnify_delta, | 181 void PinchGestureUpdate(float magnify_delta, |
| 182 const gfx::Point& anchor) override; | 182 const gfx::Point& anchor) override; |
| 183 void PinchGestureEnd() override; | 183 void PinchGestureEnd() override; |
| 184 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, | 184 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, |
| 185 bool anchor_point, | 185 bool anchor_point, |
| 186 float page_scale, | 186 float page_scale, |
| 187 base::TimeDelta duration); | 187 base::TimeDelta duration); |
| 188 void SetNeedsAnimate() override; | 188 void SetNeedsAnimateInput() override; |
| 189 bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, | 189 bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, |
| 190 InputHandler::ScrollInputType type) override; | 190 InputHandler::ScrollInputType type) override; |
| 191 bool HaveWheelEventHandlersAt(const gfx::Point& viewport_point) override; | 191 bool HaveWheelEventHandlersAt(const gfx::Point& viewport_point) override; |
| 192 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override; | 192 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override; |
| 193 scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 193 scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
| 194 ui::LatencyInfo* latency) override; | 194 ui::LatencyInfo* latency) override; |
| 195 ScrollElasticityHelper* CreateScrollElasticityHelper() override; | 195 ScrollElasticityHelper* CreateScrollElasticityHelper() override; |
| 196 | 196 |
| 197 // TopControlsManagerClient implementation. | 197 // TopControlsManagerClient implementation. |
| 198 float TopControlsHeight() const override; | 198 float TopControlsHeight() const override; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 scoped_ptr<SwapPromise> swap_promise); | 387 scoped_ptr<SwapPromise> swap_promise); |
| 388 | 388 |
| 389 bool IsActivelyScrolling() const; | 389 bool IsActivelyScrolling() const; |
| 390 | 390 |
| 391 virtual void SetVisible(bool visible); | 391 virtual void SetVisible(bool visible); |
| 392 bool visible() const { return visible_; } | 392 bool visible() const { return visible_; } |
| 393 | 393 |
| 394 bool AnimationsAreVisible() { return visible() && CanDraw(); } | 394 bool AnimationsAreVisible() { return visible() && CanDraw(); } |
| 395 | 395 |
| 396 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } | 396 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } |
| 397 void SetNeedsAnimate(); |
| 397 void SetNeedsRedraw(); | 398 void SetNeedsRedraw(); |
| 398 | 399 |
| 399 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; | 400 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; |
| 400 | 401 |
| 401 size_t memory_allocation_limit_bytes() const; | 402 size_t memory_allocation_limit_bytes() const; |
| 402 int memory_allocation_priority_cutoff() const; | 403 int memory_allocation_priority_cutoff() const; |
| 403 | 404 |
| 404 void SetViewportSize(const gfx::Size& device_viewport_size); | 405 void SetViewportSize(const gfx::Size& device_viewport_size); |
| 405 gfx::Size device_viewport_size() const { return device_viewport_size_; } | 406 gfx::Size device_viewport_size() const { return device_viewport_size_; } |
| 406 | 407 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 | 593 |
| 593 Viewport* viewport() { return viewport_.get(); } | 594 Viewport* viewport() { return viewport_.get(); } |
| 594 | 595 |
| 595 // Scroll by preferring to move the outer viewport first, only moving the | 596 // Scroll by preferring to move the outer viewport first, only moving the |
| 596 // inner if the outer is at its scroll extents. | 597 // inner if the outer is at its scroll extents. |
| 597 void ScrollViewportBy(gfx::Vector2dF scroll_delta); | 598 void ScrollViewportBy(gfx::Vector2dF scroll_delta); |
| 598 // Scroll by preferring to move the inner viewport first, only moving the | 599 // Scroll by preferring to move the inner viewport first, only moving the |
| 599 // outer if the inner is at its scroll extents. | 600 // outer if the inner is at its scroll extents. |
| 600 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta); | 601 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta); |
| 601 | 602 |
| 603 void AnimateInput(base::TimeTicks monotonic_time); |
| 602 void AnimatePageScale(base::TimeTicks monotonic_time); | 604 void AnimatePageScale(base::TimeTicks monotonic_time); |
| 603 void AnimateScrollbars(base::TimeTicks monotonic_time); | 605 void AnimateScrollbars(base::TimeTicks monotonic_time); |
| 604 void AnimateTopControls(base::TimeTicks monotonic_time); | 606 void AnimateTopControls(base::TimeTicks monotonic_time); |
| 605 | 607 |
| 606 void TrackDamageForAllSurfaces( | 608 void TrackDamageForAllSurfaces( |
| 607 LayerImpl* root_draw_layer, | 609 LayerImpl* root_draw_layer, |
| 608 const LayerImplList& render_surface_layer_list); | 610 const LayerImplList& render_surface_layer_list); |
| 609 | 611 |
| 610 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); | 612 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); |
| 611 | 613 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 ScopedPtrVector<SwapPromise> swap_promises_for_main_thread_scroll_update_; | 693 ScopedPtrVector<SwapPromise> swap_promises_for_main_thread_scroll_update_; |
| 692 | 694 |
| 693 // An object to implement the ScrollElasticityHelper interface and | 695 // An object to implement the ScrollElasticityHelper interface and |
| 694 // hold all state related to elasticity. May be NULL if never requested. | 696 // hold all state related to elasticity. May be NULL if never requested. |
| 695 scoped_ptr<ScrollElasticityHelper> scroll_elasticity_helper_; | 697 scoped_ptr<ScrollElasticityHelper> scroll_elasticity_helper_; |
| 696 | 698 |
| 697 bool tile_priorities_dirty_; | 699 bool tile_priorities_dirty_; |
| 698 | 700 |
| 699 // The optional delegate for the root layer scroll offset. | 701 // The optional delegate for the root layer scroll offset. |
| 700 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 702 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
| 703 LayerScrollOffsetDelegate::AnimationCallback root_layer_animation_callback_; |
| 704 |
| 701 const LayerTreeSettings settings_; | 705 const LayerTreeSettings settings_; |
| 702 LayerTreeDebugState debug_state_; | 706 LayerTreeDebugState debug_state_; |
| 703 bool visible_; | 707 bool visible_; |
| 704 ManagedMemoryPolicy cached_managed_memory_policy_; | 708 ManagedMemoryPolicy cached_managed_memory_policy_; |
| 705 | 709 |
| 706 gfx::Vector2dF accumulated_root_overscroll_; | 710 gfx::Vector2dF accumulated_root_overscroll_; |
| 707 | 711 |
| 708 bool pinch_gesture_active_; | 712 bool pinch_gesture_active_; |
| 709 bool pinch_gesture_end_should_clear_scrolling_layer_; | 713 bool pinch_gesture_end_should_clear_scrolling_layer_; |
| 710 gfx::Point previous_pinch_anchor_; | 714 gfx::Point previous_pinch_anchor_; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 777 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
| 774 | 778 |
| 775 scoped_ptr<Viewport> viewport_; | 779 scoped_ptr<Viewport> viewport_; |
| 776 | 780 |
| 777 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 781 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 778 }; | 782 }; |
| 779 | 783 |
| 780 } // namespace cc | 784 } // namespace cc |
| 781 | 785 |
| 782 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 786 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |