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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 InputHandler::ScrollStatus FlingScrollBegin() override; | 173 InputHandler::ScrollStatus FlingScrollBegin() override; |
174 void MouseMoveAt(const gfx::Point& viewport_point) override; | 174 void MouseMoveAt(const gfx::Point& viewport_point) override; |
175 void PinchGestureBegin() override; | 175 void PinchGestureBegin() override; |
176 void PinchGestureUpdate(float magnify_delta, | 176 void PinchGestureUpdate(float magnify_delta, |
177 const gfx::Point& anchor) override; | 177 const gfx::Point& anchor) override; |
178 void PinchGestureEnd() override; | 178 void PinchGestureEnd() override; |
179 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, | 179 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, |
180 bool anchor_point, | 180 bool anchor_point, |
181 float page_scale, | 181 float page_scale, |
182 base::TimeDelta duration); | 182 base::TimeDelta duration); |
183 void SetNeedsAnimate() override; | 183 void SetNeedsAnimateInput() override; |
184 bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, | 184 bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, |
185 InputHandler::ScrollInputType type) override; | 185 InputHandler::ScrollInputType type) override; |
186 bool HaveWheelEventHandlersAt(const gfx::Point& viewport_point) override; | 186 bool HaveWheelEventHandlersAt(const gfx::Point& viewport_point) override; |
187 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override; | 187 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override; |
188 scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 188 scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
189 ui::LatencyInfo* latency) override; | 189 ui::LatencyInfo* latency) override; |
190 ScrollElasticityHelper* CreateScrollElasticityHelper() override; | 190 ScrollElasticityHelper* CreateScrollElasticityHelper() override; |
191 | 191 |
192 // TopControlsManagerClient implementation. | 192 // TopControlsManagerClient implementation. |
193 float TopControlsHeight() const override; | 193 float TopControlsHeight() const override; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 scoped_ptr<SwapPromise> swap_promise); | 378 scoped_ptr<SwapPromise> swap_promise); |
379 | 379 |
380 bool IsActivelyScrolling() const; | 380 bool IsActivelyScrolling() const; |
381 | 381 |
382 virtual void SetVisible(bool visible); | 382 virtual void SetVisible(bool visible); |
383 bool visible() const { return visible_; } | 383 bool visible() const { return visible_; } |
384 | 384 |
385 bool AnimationsAreVisible() { return visible() && CanDraw(); } | 385 bool AnimationsAreVisible() { return visible() && CanDraw(); } |
386 | 386 |
387 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } | 387 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } |
| 388 void SetNeedsAnimate(); |
388 void SetNeedsRedraw(); | 389 void SetNeedsRedraw(); |
389 | 390 |
390 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; | 391 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; |
391 | 392 |
392 size_t memory_allocation_limit_bytes() const; | 393 size_t memory_allocation_limit_bytes() const; |
393 int memory_allocation_priority_cutoff() const; | 394 int memory_allocation_priority_cutoff() const; |
394 | 395 |
395 void SetViewportSize(const gfx::Size& device_viewport_size); | 396 void SetViewportSize(const gfx::Size& device_viewport_size); |
396 gfx::Size device_viewport_size() const { return device_viewport_size_; } | 397 gfx::Size device_viewport_size() const { return device_viewport_size_; } |
397 | 398 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 | 576 |
576 Viewport* viewport() { return viewport_.get(); } | 577 Viewport* viewport() { return viewport_.get(); } |
577 | 578 |
578 // Scroll by preferring to move the outer viewport first, only moving the | 579 // Scroll by preferring to move the outer viewport first, only moving the |
579 // inner if the outer is at its scroll extents. | 580 // inner if the outer is at its scroll extents. |
580 void ScrollViewportBy(gfx::Vector2dF scroll_delta); | 581 void ScrollViewportBy(gfx::Vector2dF scroll_delta); |
581 // Scroll by preferring to move the inner viewport first, only moving the | 582 // Scroll by preferring to move the inner viewport first, only moving the |
582 // outer if the inner is at its scroll extents. | 583 // outer if the inner is at its scroll extents. |
583 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta); | 584 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta); |
584 | 585 |
| 586 void AnimateInput(base::TimeTicks monotonic_time); |
585 void AnimatePageScale(base::TimeTicks monotonic_time); | 587 void AnimatePageScale(base::TimeTicks monotonic_time); |
586 void AnimateScrollbars(base::TimeTicks monotonic_time); | 588 void AnimateScrollbars(base::TimeTicks monotonic_time); |
587 void AnimateTopControls(base::TimeTicks monotonic_time); | 589 void AnimateTopControls(base::TimeTicks monotonic_time); |
588 | 590 |
589 void TrackDamageForAllSurfaces( | 591 void TrackDamageForAllSurfaces( |
590 LayerImpl* root_draw_layer, | 592 LayerImpl* root_draw_layer, |
591 const LayerImplList& render_surface_layer_list); | 593 const LayerImplList& render_surface_layer_list); |
592 | 594 |
593 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); | 595 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); |
594 | 596 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 ScopedPtrVector<SwapPromise> swap_promises_for_main_thread_scroll_update_; | 675 ScopedPtrVector<SwapPromise> swap_promises_for_main_thread_scroll_update_; |
674 | 676 |
675 // An object to implement the ScrollElasticityHelper interface and | 677 // An object to implement the ScrollElasticityHelper interface and |
676 // hold all state related to elasticity. May be NULL if never requested. | 678 // hold all state related to elasticity. May be NULL if never requested. |
677 scoped_ptr<ScrollElasticityHelper> scroll_elasticity_helper_; | 679 scoped_ptr<ScrollElasticityHelper> scroll_elasticity_helper_; |
678 | 680 |
679 bool tile_priorities_dirty_; | 681 bool tile_priorities_dirty_; |
680 | 682 |
681 // The optional delegate for the root layer scroll offset. | 683 // The optional delegate for the root layer scroll offset. |
682 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 684 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
| 685 LayerScrollOffsetDelegate::AnimationCallback root_layer_animation_callback_; |
| 686 |
683 const LayerTreeSettings settings_; | 687 const LayerTreeSettings settings_; |
684 LayerTreeDebugState debug_state_; | 688 LayerTreeDebugState debug_state_; |
685 bool visible_; | 689 bool visible_; |
686 ManagedMemoryPolicy cached_managed_memory_policy_; | 690 ManagedMemoryPolicy cached_managed_memory_policy_; |
687 | 691 |
688 gfx::Vector2dF accumulated_root_overscroll_; | 692 gfx::Vector2dF accumulated_root_overscroll_; |
689 | 693 |
690 bool pinch_gesture_active_; | 694 bool pinch_gesture_active_; |
691 bool pinch_gesture_end_should_clear_scrolling_layer_; | 695 bool pinch_gesture_end_should_clear_scrolling_layer_; |
692 gfx::Point previous_pinch_anchor_; | 696 gfx::Point previous_pinch_anchor_; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 764 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
761 | 765 |
762 scoped_ptr<Viewport> viewport_; | 766 scoped_ptr<Viewport> viewport_; |
763 | 767 |
764 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 768 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
765 }; | 769 }; |
766 | 770 |
767 } // namespace cc | 771 } // namespace cc |
768 | 772 |
769 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 773 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |