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

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

Issue 2080703005: cc: Remove LayerTreeImpl::root_layer usage outside tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/test/layer_tree_json_parser_unittest.cc ('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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <bitset> 10 #include <bitset>
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 // Returns the tree LTH synchronizes with. 440 // Returns the tree LTH synchronizes with.
441 LayerTreeImpl* sync_tree() { 441 LayerTreeImpl* sync_tree() {
442 // TODO(enne): This is bogus. It should return based on the value of 442 // TODO(enne): This is bogus. It should return based on the value of
443 // CommitToActiveTree() and not whether the pending tree exists. 443 // CommitToActiveTree() and not whether the pending tree exists.
444 return pending_tree_ ? pending_tree_.get() : active_tree_.get(); 444 return pending_tree_ ? pending_tree_.get() : active_tree_.get();
445 } 445 }
446 virtual void CreatePendingTree(); 446 virtual void CreatePendingTree();
447 virtual void ActivateSyncTree(); 447 virtual void ActivateSyncTree();
448 448
449 // Shortcuts to layers on the active tree. 449 // Shortcuts to layers on the active tree.
450 LayerImpl* RootLayer() const;
451 LayerImpl* InnerViewportScrollLayer() const; 450 LayerImpl* InnerViewportScrollLayer() const;
452 LayerImpl* OuterViewportScrollLayer() const; 451 LayerImpl* OuterViewportScrollLayer() const;
453 LayerImpl* CurrentlyScrollingLayer() const; 452 LayerImpl* CurrentlyScrollingLayer() const;
454 453
455 int scroll_layer_id_when_mouse_over_scrollbar() const { 454 int scroll_layer_id_when_mouse_over_scrollbar() const {
456 return scroll_layer_id_when_mouse_over_scrollbar_; 455 return scroll_layer_id_when_mouse_over_scrollbar_;
457 } 456 }
458 bool scroll_affects_scroll_handler() const { 457 bool scroll_affects_scroll_handler() const {
459 return scroll_affects_scroll_handler_; 458 return scroll_affects_scroll_handler_;
460 } 459 }
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 ScrollState* scroll_state, 690 ScrollState* scroll_state,
692 LayerImpl* scrolling_layer_impl, 691 LayerImpl* scrolling_layer_impl,
693 InputHandler::ScrollInputType type); 692 InputHandler::ScrollInputType type);
694 void DistributeScrollDelta(ScrollState* scroll_state); 693 void DistributeScrollDelta(ScrollState* scroll_state);
695 694
696 bool AnimatePageScale(base::TimeTicks monotonic_time); 695 bool AnimatePageScale(base::TimeTicks monotonic_time);
697 bool AnimateScrollbars(base::TimeTicks monotonic_time); 696 bool AnimateScrollbars(base::TimeTicks monotonic_time);
698 bool AnimateTopControls(base::TimeTicks monotonic_time); 697 bool AnimateTopControls(base::TimeTicks monotonic_time);
699 698
700 void TrackDamageForAllSurfaces( 699 void TrackDamageForAllSurfaces(
701 LayerImpl* root_draw_layer,
702 const LayerImplList& render_surface_layer_list); 700 const LayerImplList& render_surface_layer_list);
703 701
704 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); 702 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy);
705 703
706 // This function should only be called from PrepareToDraw, as DidDrawAllLayers 704 // This function should only be called from PrepareToDraw, as DidDrawAllLayers
707 // must be called if this helper function is called. Returns DRAW_SUCCESS if 705 // must be called if this helper function is called. Returns DRAW_SUCCESS if
708 // the frame should be drawn. 706 // the frame should be drawn.
709 DrawResult CalculateRenderPasses(FrameData* frame); 707 DrawResult CalculateRenderPasses(FrameData* frame);
710 708
711 void ClearCurrentlyScrollingLayer(); 709 void ClearCurrentlyScrollingLayer();
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 fixed_raster_scale_attempted_scale_change_history_; 866 fixed_raster_scale_attempted_scale_change_history_;
869 std::unique_ptr<PendingTreeDurationHistogramTimer> 867 std::unique_ptr<PendingTreeDurationHistogramTimer>
870 pending_tree_duration_timer_; 868 pending_tree_duration_timer_;
871 869
872 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 870 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
873 }; 871 };
874 872
875 } // namespace cc 873 } // namespace cc
876 874
877 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 875 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_json_parser_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698