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