| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 LayerImpl* LayerById(int id) const; | 339 LayerImpl* LayerById(int id) const; |
| 340 | 340 |
| 341 int LayerIdByElementId(ElementId element_id) const; | 341 int LayerIdByElementId(ElementId element_id) const; |
| 342 // TODO(jaydasika): this is deprecated. It is used by | 342 // TODO(jaydasika): this is deprecated. It is used by |
| 343 // animation/compositor-worker to look up layers to mutate, but in future, we | 343 // animation/compositor-worker to look up layers to mutate, but in future, we |
| 344 // will update property trees. | 344 // will update property trees. |
| 345 LayerImpl* LayerByElementId(ElementId element_id) const; | 345 LayerImpl* LayerByElementId(ElementId element_id) const; |
| 346 void AddToElementMap(LayerImpl* layer); | 346 void AddToElementMap(LayerImpl* layer); |
| 347 void RemoveFromElementMap(LayerImpl* layer); | 347 void RemoveFromElementMap(LayerImpl* layer); |
| 348 | 348 |
| 349 using SurfaceIdsList = std::vector<const SurfaceId*>; |
| 350 void SetHiddenSurfaceLayerIds(const SurfaceIdsList* hidden_surface_layer_ids); |
| 351 const SurfaceIdsList* HiddenSurfaceLayerIds() const; |
| 352 void ClearHiddenSurfaceLayerIds(); |
| 353 |
| 349 void AddLayerShouldPushProperties(LayerImpl* layer); | 354 void AddLayerShouldPushProperties(LayerImpl* layer); |
| 350 void RemoveLayerShouldPushProperties(LayerImpl* layer); | 355 void RemoveLayerShouldPushProperties(LayerImpl* layer); |
| 351 std::unordered_set<LayerImpl*>& LayersThatShouldPushProperties(); | 356 std::unordered_set<LayerImpl*>& LayersThatShouldPushProperties(); |
| 352 bool LayerNeedsPushPropertiesForTesting(LayerImpl* layer); | 357 bool LayerNeedsPushPropertiesForTesting(LayerImpl* layer); |
| 353 | 358 |
| 354 // These should be called by LayerImpl's ctor/dtor. | 359 // These should be called by LayerImpl's ctor/dtor. |
| 355 void RegisterLayer(LayerImpl* layer); | 360 void RegisterLayer(LayerImpl* layer); |
| 356 void UnregisterLayer(LayerImpl* layer); | 361 void UnregisterLayer(LayerImpl* layer); |
| 357 | 362 |
| 358 // These manage ownership of the LayerImpl. | 363 // These manage ownership of the LayerImpl. |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 std::unordered_map<int, int> clip_scroll_map_; | 577 std::unordered_map<int, int> clip_scroll_map_; |
| 573 | 578 |
| 574 // Maps scroll element ids to scrollbar layer ids. For each scroll layer, | 579 // Maps scroll element ids to scrollbar layer ids. For each scroll layer, |
| 575 // there may be 1 or 2 scrollbar layers (for vertical and horizontal). (This | 580 // there may be 1 or 2 scrollbar layers (for vertical and horizontal). (This |
| 576 // is derived from ScrollbarLayerImplBase::scroll_element_id_ and exists to | 581 // is derived from ScrollbarLayerImplBase::scroll_element_id_ and exists to |
| 577 // avoid O(n) walks.) | 582 // avoid O(n) walks.) |
| 578 // TODO(pdr): Refactor this to be more efficient--likely a map where the value | 583 // TODO(pdr): Refactor this to be more efficient--likely a map where the value |
| 579 // is a pair of scrollbar layer ids instead of using a multimap. | 584 // is a pair of scrollbar layer ids instead of using a multimap. |
| 580 std::multimap<ElementId, int> element_id_to_scrollbar_layer_ids_; | 585 std::multimap<ElementId, int> element_id_to_scrollbar_layer_ids_; |
| 581 | 586 |
| 587 SurfaceIdsList hidden_surface_layer_ids_; |
| 588 |
| 582 std::vector<PictureLayerImpl*> picture_layers_; | 589 std::vector<PictureLayerImpl*> picture_layers_; |
| 583 LayerImplList surface_layers_; | 590 LayerImplList surface_layers_; |
| 584 | 591 |
| 585 // List of render surfaces for the most recently prepared frame. | 592 // List of render surfaces for the most recently prepared frame. |
| 586 RenderSurfaceList render_surface_list_; | 593 RenderSurfaceList render_surface_list_; |
| 587 // After drawing the |render_surface_list_| the areas in this region | 594 // After drawing the |render_surface_list_| the areas in this region |
| 588 // would not be fully covered by opaque content. | 595 // would not be fully covered by opaque content. |
| 589 Region unoccluded_screen_space_region_; | 596 Region unoccluded_screen_space_region_; |
| 590 | 597 |
| 591 bool viewport_size_invalid_; | 598 bool viewport_size_invalid_; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 // lifecycle states. See: |LayerTreeLifecycle|. | 633 // lifecycle states. See: |LayerTreeLifecycle|. |
| 627 LayerTreeLifecycle lifecycle_; | 634 LayerTreeLifecycle lifecycle_; |
| 628 | 635 |
| 629 private: | 636 private: |
| 630 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 637 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 631 }; | 638 }; |
| 632 | 639 |
| 633 } // namespace cc | 640 } // namespace cc |
| 634 | 641 |
| 635 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 642 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |