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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 return top_controls_shown_ratio_.get(); | 261 return top_controls_shown_ratio_.get(); |
262 } | 262 } |
263 const SyncedTopControls* top_controls_shown_ratio() const { | 263 const SyncedTopControls* top_controls_shown_ratio() const { |
264 return top_controls_shown_ratio_.get(); | 264 return top_controls_shown_ratio_.get(); |
265 } | 265 } |
266 | 266 |
267 // Updates draw properties and render surface layer list, as well as tile | 267 // Updates draw properties and render surface layer list, as well as tile |
268 // priorities. Returns false if it was unable to update. Updating lcd | 268 // priorities. Returns false if it was unable to update. Updating lcd |
269 // text may cause invalidations, so should only be done after a commit. | 269 // text may cause invalidations, so should only be done after a commit. |
270 bool UpdateDrawProperties(bool update_lcd_text); | 270 bool UpdateDrawProperties(bool update_lcd_text); |
271 void BuildPropertyTreesForTesting(); | 271 void BuildLayerListAndPropertyTreesForTesting(); |
272 | 272 |
273 void set_needs_update_draw_properties() { | 273 void set_needs_update_draw_properties() { |
274 needs_update_draw_properties_ = true; | 274 needs_update_draw_properties_ = true; |
275 } | 275 } |
276 bool needs_update_draw_properties() const { | 276 bool needs_update_draw_properties() const { |
277 return needs_update_draw_properties_; | 277 return needs_update_draw_properties_; |
278 } | 278 } |
279 | 279 |
280 bool is_in_resourceless_software_draw_mode() { | 280 bool is_in_resourceless_software_draw_mode() { |
281 return (layer_tree_host_impl_->GetDrawMode() == | 281 return (layer_tree_host_impl_->GetDrawMode() == |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 float min_page_scale_factor_; | 512 float min_page_scale_factor_; |
513 float max_page_scale_factor_; | 513 float max_page_scale_factor_; |
514 | 514 |
515 float device_scale_factor_; | 515 float device_scale_factor_; |
516 float painted_device_scale_factor_; | 516 float painted_device_scale_factor_; |
517 | 517 |
518 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; | 518 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; |
519 | 519 |
520 std::unique_ptr<OwnedLayerImplList> layers_; | 520 std::unique_ptr<OwnedLayerImplList> layers_; |
521 LayerImplMap layer_id_map_; | 521 LayerImplMap layer_id_map_; |
| 522 std::vector<LayerImpl*> layer_list_; |
522 // Set of layers that need to push properties. | 523 // Set of layers that need to push properties. |
523 std::unordered_set<LayerImpl*> layers_that_should_push_properties_; | 524 std::unordered_set<LayerImpl*> layers_that_should_push_properties_; |
524 | 525 |
525 std::unordered_map<uint64_t, ElementLayers> element_layers_map_; | 526 std::unordered_map<uint64_t, ElementLayers> element_layers_map_; |
526 | 527 |
527 std::unordered_map<int, float> opacity_animations_map_; | 528 std::unordered_map<int, float> opacity_animations_map_; |
528 std::unordered_map<int, gfx::Transform> transform_animations_map_; | 529 std::unordered_map<int, gfx::Transform> transform_animations_map_; |
529 | 530 |
530 // Maps from clip layer ids to scroll layer ids. Note that this only includes | 531 // Maps from clip layer ids to scroll layer ids. Note that this only includes |
531 // the subset of clip layers that act as scrolling containers. (This is | 532 // the subset of clip layers that act as scrolling containers. (This is |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 bool top_controls_shrink_blink_size_; | 573 bool top_controls_shrink_blink_size_; |
573 float top_controls_height_; | 574 float top_controls_height_; |
574 | 575 |
575 // The amount that the top controls are shown from 0 (hidden) to 1 (fully | 576 // The amount that the top controls are shown from 0 (hidden) to 1 (fully |
576 // shown). | 577 // shown). |
577 scoped_refptr<SyncedTopControls> top_controls_shown_ratio_; | 578 scoped_refptr<SyncedTopControls> top_controls_shown_ratio_; |
578 | 579 |
579 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 580 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
580 | 581 |
581 private: | 582 private: |
| 583 void BuildLayerListForTesting(); |
582 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 584 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
583 }; | 585 }; |
584 | 586 |
585 } // namespace cc | 587 } // namespace cc |
586 | 588 |
587 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 589 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |