Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1393)

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 274323004: NOT FOR LANDING - [WebView] Allow fling animation via the LayerScrollOffsetDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/input/layer_scroll_offset_delegate.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 InputHandler::ScrollStatus FlingScrollBegin() override; 156 InputHandler::ScrollStatus FlingScrollBegin() override;
157 void MouseMoveAt(const gfx::Point& viewport_point) override; 157 void MouseMoveAt(const gfx::Point& viewport_point) override;
158 void PinchGestureBegin() override; 158 void PinchGestureBegin() override;
159 void PinchGestureUpdate(float magnify_delta, 159 void PinchGestureUpdate(float magnify_delta,
160 const gfx::Point& anchor) override; 160 const gfx::Point& anchor) override;
161 void PinchGestureEnd() override; 161 void PinchGestureEnd() override;
162 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, 162 void StartPageScaleAnimation(const gfx::Vector2d& target_offset,
163 bool anchor_point, 163 bool anchor_point,
164 float page_scale, 164 float page_scale,
165 base::TimeDelta duration); 165 base::TimeDelta duration);
166 void SetNeedsAnimate() override; 166 void SetNeedsAnimateInput() override;
167 bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, 167 bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point,
168 InputHandler::ScrollInputType type) override; 168 InputHandler::ScrollInputType type) override;
169 bool HaveWheelEventHandlersAt(const gfx::Point& viewport_point) override; 169 bool HaveWheelEventHandlersAt(const gfx::Point& viewport_point) override;
170 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override; 170 bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override;
171 scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( 171 scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
172 ui::LatencyInfo* latency) override; 172 ui::LatencyInfo* latency) override;
173 ScrollElasticityHelper* CreateScrollElasticityHelper() override; 173 ScrollElasticityHelper* CreateScrollElasticityHelper() override;
174 174
175 // TopControlsManagerClient implementation. 175 // TopControlsManagerClient implementation.
176 float TopControlsHeight() const override; 176 float TopControlsHeight() const override;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 scoped_ptr<SwapPromise> swap_promise); 354 scoped_ptr<SwapPromise> swap_promise);
355 355
356 bool IsActivelyScrolling() const; 356 bool IsActivelyScrolling() const;
357 357
358 virtual void SetVisible(bool visible); 358 virtual void SetVisible(bool visible);
359 bool visible() const { return visible_; } 359 bool visible() const { return visible_; }
360 360
361 bool AnimationsAreVisible() { return visible() && CanDraw(); } 361 bool AnimationsAreVisible() { return visible() && CanDraw(); }
362 362
363 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } 363 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); }
364 void SetNeedsAnimate();
364 void SetNeedsRedraw(); 365 void SetNeedsRedraw();
365 366
366 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; 367 ManagedMemoryPolicy ActualManagedMemoryPolicy() const;
367 368
368 size_t memory_allocation_limit_bytes() const; 369 size_t memory_allocation_limit_bytes() const;
369 int memory_allocation_priority_cutoff() const; 370 int memory_allocation_priority_cutoff() const;
370 371
371 void SetViewportSize(const gfx::Size& device_viewport_size); 372 void SetViewportSize(const gfx::Size& device_viewport_size);
372 gfx::Size device_viewport_size() const { return device_viewport_size_; } 373 gfx::Size device_viewport_size() const { return device_viewport_size_; }
373 374
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 void EnforceZeroBudget(bool zero_budget); 549 void EnforceZeroBudget(bool zero_budget);
549 550
550 bool IsSynchronousSingleThreaded() const; 551 bool IsSynchronousSingleThreaded() const;
551 552
552 // Scroll by preferring to move the outer viewport first, only moving the 553 // Scroll by preferring to move the outer viewport first, only moving the
553 // inner if the outer is at its scroll extents. 554 // inner if the outer is at its scroll extents.
554 void ScrollViewportBy(gfx::Vector2dF scroll_delta); 555 void ScrollViewportBy(gfx::Vector2dF scroll_delta);
555 // Scroll by preferring to move the inner viewport first, only moving the 556 // Scroll by preferring to move the inner viewport first, only moving the
556 // outer if the inner is at its scroll extents. 557 // outer if the inner is at its scroll extents.
557 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta); 558 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta);
559 void AnimateInput(base::TimeTicks monotonic_time);
558 void AnimatePageScale(base::TimeTicks monotonic_time); 560 void AnimatePageScale(base::TimeTicks monotonic_time);
559 void AnimateScrollbars(base::TimeTicks monotonic_time); 561 void AnimateScrollbars(base::TimeTicks monotonic_time);
560 void AnimateTopControls(base::TimeTicks monotonic_time); 562 void AnimateTopControls(base::TimeTicks monotonic_time);
561 563
562 bool ShouldTopControlsConsumeScroll(const gfx::Vector2dF& scroll_delta) const; 564 bool ShouldTopControlsConsumeScroll(const gfx::Vector2dF& scroll_delta) const;
563 565
564 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( 566 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta(
565 LayerImpl* layer_impl, 567 LayerImpl* layer_impl,
566 float scale_from_viewport_to_screen_space, 568 float scale_from_viewport_to_screen_space,
567 const gfx::PointF& viewport_point, 569 const gfx::PointF& viewport_point,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 ScopedPtrVector<SwapPromise> swap_promises_for_main_thread_scroll_update_; 648 ScopedPtrVector<SwapPromise> swap_promises_for_main_thread_scroll_update_;
647 649
648 // An object to implement the ScrollElasticityHelper interface and 650 // An object to implement the ScrollElasticityHelper interface and
649 // hold all state related to elasticity. May be NULL if never requested. 651 // hold all state related to elasticity. May be NULL if never requested.
650 scoped_ptr<ScrollElasticityHelper> scroll_elasticity_helper_; 652 scoped_ptr<ScrollElasticityHelper> scroll_elasticity_helper_;
651 653
652 bool tile_priorities_dirty_; 654 bool tile_priorities_dirty_;
653 655
654 // The optional delegate for the root layer scroll offset. 656 // The optional delegate for the root layer scroll offset.
655 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; 657 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_;
658 LayerScrollOffsetDelegate::AnimationCallback root_layer_animation_callback_;
659
656 LayerTreeSettings settings_; 660 LayerTreeSettings settings_;
657 LayerTreeDebugState debug_state_; 661 LayerTreeDebugState debug_state_;
658 bool visible_; 662 bool visible_;
659 ManagedMemoryPolicy cached_managed_memory_policy_; 663 ManagedMemoryPolicy cached_managed_memory_policy_;
660 664
661 gfx::Vector2dF accumulated_root_overscroll_; 665 gfx::Vector2dF accumulated_root_overscroll_;
662 666
663 bool pinch_gesture_active_; 667 bool pinch_gesture_active_;
664 bool pinch_gesture_end_should_clear_scrolling_layer_; 668 bool pinch_gesture_end_should_clear_scrolling_layer_;
665 gfx::Point previous_pinch_anchor_; 669 gfx::Point previous_pinch_anchor_;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 bool is_likely_to_require_a_draw_; 736 bool is_likely_to_require_a_draw_;
733 737
734 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; 738 scoped_ptr<FrameTimingTracker> frame_timing_tracker_;
735 739
736 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 740 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
737 }; 741 };
738 742
739 } // namespace cc 743 } // namespace cc
740 744
741 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 745 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/input/layer_scroll_offset_delegate.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698