OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void SetNeedsRedraw(); | 124 void SetNeedsRedraw(); |
125 | 125 |
126 // Tracing methods. | 126 // Tracing methods. |
127 // --------------------------------------------------------------------------- | 127 // --------------------------------------------------------------------------- |
128 void GetAllPrioritizedTilesForTracing( | 128 void GetAllPrioritizedTilesForTracing( |
129 std::vector<PrioritizedTile>* prioritized_tiles) const; | 129 std::vector<PrioritizedTile>* prioritized_tiles) const; |
130 void AsValueInto(base::trace_event::TracedValue* dict) const; | 130 void AsValueInto(base::trace_event::TracedValue* dict) const; |
131 | 131 |
132 // Other public methods | 132 // Other public methods |
133 // --------------------------------------------------------------------------- | 133 // --------------------------------------------------------------------------- |
134 LayerImpl* root_layer() const { return root_layer_; } | 134 LayerImpl* root_layer_for_testing() { |
| 135 return layer_list_.empty() ? nullptr : layer_list_[0]; |
| 136 } |
135 RenderSurfaceImpl* RootRenderSurface() const; | 137 RenderSurfaceImpl* RootRenderSurface() const; |
136 bool LayerListIsEmpty() const; | 138 bool LayerListIsEmpty() const; |
137 void SetRootLayer(std::unique_ptr<LayerImpl>); | 139 void SetRootLayerForTesting(std::unique_ptr<LayerImpl>); |
138 void SetRootLayerFromLayerList(); | 140 void SetRootLayerFromLayerListForTesting(); |
| 141 void OnCanDrawStateChangedForTree(); |
139 bool IsRootLayer(const LayerImpl* layer) const; | 142 bool IsRootLayer(const LayerImpl* layer) const; |
140 std::unique_ptr<OwnedLayerImplList> DetachLayers(); | 143 std::unique_ptr<OwnedLayerImplList> DetachLayers(); |
141 | 144 |
142 void SetPropertyTrees(PropertyTrees* property_trees); | 145 void SetPropertyTrees(PropertyTrees* property_trees); |
143 PropertyTrees* property_trees() { return &property_trees_; } | 146 PropertyTrees* property_trees() { return &property_trees_; } |
144 | 147 |
145 void UpdatePropertyTreesForBoundsDelta(); | 148 void UpdatePropertyTreesForBoundsDelta(); |
146 | 149 |
147 void PushPropertiesTo(LayerTreeImpl* tree_impl); | 150 void PushPropertiesTo(LayerTreeImpl* tree_impl); |
148 | 151 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 float max_page_scale_factor); | 496 float max_page_scale_factor); |
494 bool IsViewportLayerId(int id) const; | 497 bool IsViewportLayerId(int id) const; |
495 void UpdateScrollbars(int scroll_layer_id, int clip_layer_id); | 498 void UpdateScrollbars(int scroll_layer_id, int clip_layer_id); |
496 void DidUpdatePageScale(); | 499 void DidUpdatePageScale(); |
497 void PushTopControls(const float* top_controls_shown_ratio); | 500 void PushTopControls(const float* top_controls_shown_ratio); |
498 bool ClampTopControlsShownRatio(); | 501 bool ClampTopControlsShownRatio(); |
499 | 502 |
500 LayerTreeHostImpl* layer_tree_host_impl_; | 503 LayerTreeHostImpl* layer_tree_host_impl_; |
501 int source_frame_number_; | 504 int source_frame_number_; |
502 int is_first_frame_after_commit_tracker_; | 505 int is_first_frame_after_commit_tracker_; |
503 LayerImpl* root_layer_; | 506 LayerImpl* root_layer_for_testing_; |
504 HeadsUpDisplayLayerImpl* hud_layer_; | 507 HeadsUpDisplayLayerImpl* hud_layer_; |
505 PropertyTrees property_trees_; | 508 PropertyTrees property_trees_; |
506 SkColor background_color_; | 509 SkColor background_color_; |
507 bool has_transparent_background_; | 510 bool has_transparent_background_; |
508 | 511 |
509 int last_scrolled_layer_id_; | 512 int last_scrolled_layer_id_; |
510 int overscroll_elasticity_layer_id_; | 513 int overscroll_elasticity_layer_id_; |
511 int page_scale_layer_id_; | 514 int page_scale_layer_id_; |
512 int inner_viewport_scroll_layer_id_; | 515 int inner_viewport_scroll_layer_id_; |
513 int outer_viewport_scroll_layer_id_; | 516 int outer_viewport_scroll_layer_id_; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 | 588 |
586 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 589 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
587 | 590 |
588 private: | 591 private: |
589 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 592 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
590 }; | 593 }; |
591 | 594 |
592 } // namespace cc | 595 } // namespace cc |
593 | 596 |
594 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 597 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |