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