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

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

Issue 1805343006: cc: Impl thread scroll on ScrollNode instead of LayerImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove LayerImpl from ScrollAnimated Created 4 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
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 InputHandler::ScrollStatus ScrollBegin( 163 InputHandler::ScrollStatus ScrollBegin(
164 ScrollState* scroll_state, 164 ScrollState* scroll_state,
165 InputHandler::ScrollInputType type) override; 165 InputHandler::ScrollInputType type) override;
166 InputHandler::ScrollStatus RootScrollBegin( 166 InputHandler::ScrollStatus RootScrollBegin(
167 ScrollState* scroll_state, 167 ScrollState* scroll_state,
168 InputHandler::ScrollInputType type) override; 168 InputHandler::ScrollInputType type) override;
169 ScrollStatus ScrollAnimatedBegin(const gfx::Point& viewport_point) override; 169 ScrollStatus ScrollAnimatedBegin(const gfx::Point& viewport_point) override;
170 InputHandler::ScrollStatus ScrollAnimated( 170 InputHandler::ScrollStatus ScrollAnimated(
171 const gfx::Point& viewport_point, 171 const gfx::Point& viewport_point,
172 const gfx::Vector2dF& scroll_delta) override; 172 const gfx::Vector2dF& scroll_delta) override;
173 void ApplyScroll(LayerImpl* layer, ScrollState* scroll_state); 173 void ApplyScroll(ScrollNode* scroll_node, ScrollState* scroll_state);
174 InputHandlerScrollResult ScrollBy(ScrollState* scroll_state) override; 174 InputHandlerScrollResult ScrollBy(ScrollState* scroll_state) override;
175 bool ScrollVerticallyByPage(const gfx::Point& viewport_point, 175 bool ScrollVerticallyByPage(const gfx::Point& viewport_point,
176 ScrollDirection direction) override; 176 ScrollDirection direction) override;
177 void RequestUpdateForSynchronousInputHandler() override; 177 void RequestUpdateForSynchronousInputHandler() override;
178 void SetSynchronousInputHandlerRootScrollOffset( 178 void SetSynchronousInputHandlerRootScrollOffset(
179 const gfx::ScrollOffset& root_offset) override; 179 const gfx::ScrollOffset& root_offset) override;
180 void ScrollEnd(ScrollState* scroll_state) override; 180 void ScrollEnd(ScrollState* scroll_state) override;
181 InputHandler::ScrollStatus FlingScrollBegin() override; 181 InputHandler::ScrollStatus FlingScrollBegin() override;
182 void MouseMoveAt(const gfx::Point& viewport_point) override; 182 void MouseMoveAt(const gfx::Point& viewport_point) override;
183 void PinchGestureBegin() override; 183 void PinchGestureBegin() override;
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 virtual void CreateResourceAndTileTaskWorkerPool( 567 virtual void CreateResourceAndTileTaskWorkerPool(
568 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, 568 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
569 scoped_ptr<ResourcePool>* resource_pool); 569 scoped_ptr<ResourcePool>* resource_pool);
570 570
571 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } 571 bool prepare_tiles_needed() const { return tile_priorities_dirty_; }
572 572
573 FrameTimingTracker* frame_timing_tracker() { 573 FrameTimingTracker* frame_timing_tracker() {
574 return frame_timing_tracker_.get(); 574 return frame_timing_tracker_.get();
575 } 575 }
576 576
577 gfx::Vector2dF ScrollLayer(LayerImpl* layer_impl, 577 gfx::Vector2dF ScrollSingleNode(ScrollNode* scroll_node,
578 const gfx::Vector2dF& delta, 578 const gfx::Vector2dF& delta,
579 const gfx::Point& viewport_point, 579 const gfx::Point& viewport_point,
580 bool is_direct_manipulation); 580 bool is_direct_manipulation,
581 ScrollTree* scroll_tree);
581 582
582 // Record main frame timing information. 583 // Record main frame timing information.
583 // |start_of_main_frame_args| is the BeginFrameArgs of the beginning of the 584 // |start_of_main_frame_args| is the BeginFrameArgs of the beginning of the
584 // main frame (ie the frame that kicked off the main frame). 585 // main frame (ie the frame that kicked off the main frame).
585 // |expected_next_main_frame_args| is the BeginFrameArgs of the frame that 586 // |expected_next_main_frame_args| is the BeginFrameArgs of the frame that
586 // follows the completion of the main frame (whether it is activation or some 587 // follows the completion of the main frame (whether it is activation or some
587 // other completion, such as early out). Note that if there is a main frame 588 // other completion, such as early out). Note that if there is a main frame
588 // scheduled in that frame, then this BeginFrameArgs will become the main 589 // scheduled in that frame, then this BeginFrameArgs will become the main
589 // frame args. However, if no such frame is scheduled, then this _would_ be 590 // frame args. However, if no such frame is scheduled, then this _would_ be
590 // the main frame args if it was scheduled. 591 // the main frame args if it was scheduled.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 630
630 // Removes empty or orphan RenderPasses from the frame. 631 // Removes empty or orphan RenderPasses from the frame.
631 static void RemoveRenderPasses(FrameData* frame); 632 static void RemoveRenderPasses(FrameData* frame);
632 633
633 LayerTreeHostImplClient* client_; 634 LayerTreeHostImplClient* client_;
634 TaskRunnerProvider* task_runner_provider_; 635 TaskRunnerProvider* task_runner_provider_;
635 636
636 BeginFrameTracker current_begin_frame_tracker_; 637 BeginFrameTracker current_begin_frame_tracker_;
637 638
638 private: 639 private:
639 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( 640 gfx::Vector2dF ScrollNodeWithViewportSpaceDelta(
640 LayerImpl* layer_impl, 641 ScrollNode* scroll_node,
641 const gfx::PointF& viewport_point, 642 const gfx::PointF& viewport_point,
642 const gfx::Vector2dF& viewport_delta); 643 const gfx::Vector2dF& viewport_delta,
644 ScrollTree* scroll_tree);
643 645
644 void CreateAndSetRenderer(); 646 void CreateAndSetRenderer();
645 void CleanUpTileManagerAndUIResources(); 647 void CleanUpTileManagerAndUIResources();
646 void CreateTileManagerResources(); 648 void CreateTileManagerResources();
647 void ReleaseTreeResources(); 649 void ReleaseTreeResources();
648 void RecreateTreeResources(); 650 void RecreateTreeResources();
649 651
650 void AnimateInternal(bool active_tree); 652 void AnimateInternal(bool active_tree);
651 653
652 void UpdateGpuRasterizationStatus(); 654 void UpdateGpuRasterizationStatus();
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; 840 scoped_ptr<FrameTimingTracker> frame_timing_tracker_;
839 841
840 scoped_ptr<Viewport> viewport_; 842 scoped_ptr<Viewport> viewport_;
841 843
842 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 844 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
843 }; 845 };
844 846
845 } // namespace cc 847 } // namespace cc
846 848
847 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 849 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698