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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 LayerImpl* LayerById(int id) const; | 352 LayerImpl* LayerById(int id) const; |
353 | 353 |
354 int LayerIdByElementId(ElementId element_id) const; | 354 int LayerIdByElementId(ElementId element_id) const; |
355 // TODO(jaydasika): this is deprecated. It is used by | 355 // TODO(jaydasika): this is deprecated. It is used by |
356 // animation/compositor-worker to look up layers to mutate, but in future, we | 356 // animation/compositor-worker to look up layers to mutate, but in future, we |
357 // will update property trees. | 357 // will update property trees. |
358 LayerImpl* LayerByElementId(ElementId element_id) const; | 358 LayerImpl* LayerByElementId(ElementId element_id) const; |
359 void AddToElementMap(LayerImpl* layer); | 359 void AddToElementMap(LayerImpl* layer); |
360 void RemoveFromElementMap(LayerImpl* layer); | 360 void RemoveFromElementMap(LayerImpl* layer); |
361 | 361 |
| 362 using SurfaceIdsList = std::vector<const SurfaceId*>; |
| 363 void SetHiddenSurfaceLayerIds(const SurfaceIdsList* hidden_surface_layer_ids); |
| 364 const SurfaceIdsList* HiddenSurfaceLayerIds() const; |
| 365 void ClearHiddenSurfaceLayerIds(); |
| 366 |
362 void AddLayerShouldPushProperties(LayerImpl* layer); | 367 void AddLayerShouldPushProperties(LayerImpl* layer); |
363 void RemoveLayerShouldPushProperties(LayerImpl* layer); | 368 void RemoveLayerShouldPushProperties(LayerImpl* layer); |
364 std::unordered_set<LayerImpl*>& LayersThatShouldPushProperties(); | 369 std::unordered_set<LayerImpl*>& LayersThatShouldPushProperties(); |
365 bool LayerNeedsPushPropertiesForTesting(LayerImpl* layer); | 370 bool LayerNeedsPushPropertiesForTesting(LayerImpl* layer); |
366 | 371 |
367 // These should be called by LayerImpl's ctor/dtor. | 372 // These should be called by LayerImpl's ctor/dtor. |
368 void RegisterLayer(LayerImpl* layer); | 373 void RegisterLayer(LayerImpl* layer); |
369 void UnregisterLayer(LayerImpl* layer); | 374 void UnregisterLayer(LayerImpl* layer); |
370 | 375 |
371 // These manage ownership of the LayerImpl. | 376 // These manage ownership of the LayerImpl. |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 std::unordered_map<int, int> clip_scroll_map_; | 584 std::unordered_map<int, int> clip_scroll_map_; |
580 | 585 |
581 // Maps scroll element ids to scrollbar layer ids. For each scroll layer, | 586 // Maps scroll element ids to scrollbar layer ids. For each scroll layer, |
582 // there may be 1 or 2 scrollbar layers (for vertical and horizontal). (This | 587 // there may be 1 or 2 scrollbar layers (for vertical and horizontal). (This |
583 // is derived from ScrollbarLayerImplBase::scroll_element_id_ and exists to | 588 // is derived from ScrollbarLayerImplBase::scroll_element_id_ and exists to |
584 // avoid O(n) walks.) | 589 // avoid O(n) walks.) |
585 // TODO(pdr): Refactor this to be more efficient--likely a map where the value | 590 // TODO(pdr): Refactor this to be more efficient--likely a map where the value |
586 // is a pair of scrollbar layer ids instead of using a multimap. | 591 // is a pair of scrollbar layer ids instead of using a multimap. |
587 std::multimap<ElementId, int> element_id_to_scrollbar_layer_ids_; | 592 std::multimap<ElementId, int> element_id_to_scrollbar_layer_ids_; |
588 | 593 |
| 594 SurfaceIdsList hidden_surface_layer_ids_; |
| 595 |
589 std::vector<PictureLayerImpl*> picture_layers_; | 596 std::vector<PictureLayerImpl*> picture_layers_; |
590 LayerImplList surface_layers_; | 597 LayerImplList surface_layers_; |
591 | 598 |
592 // List of render surfaces for the most recently prepared frame. | 599 // List of render surfaces for the most recently prepared frame. |
593 RenderSurfaceList render_surface_list_; | 600 RenderSurfaceList render_surface_list_; |
594 // After drawing the |render_surface_list_| the areas in this region | 601 // After drawing the |render_surface_list_| the areas in this region |
595 // would not be fully covered by opaque content. | 602 // would not be fully covered by opaque content. |
596 Region unoccluded_screen_space_region_; | 603 Region unoccluded_screen_space_region_; |
597 | 604 |
598 bool viewport_size_invalid_; | 605 bool viewport_size_invalid_; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 // lifecycle states. See: |LayerTreeLifecycle|. | 640 // lifecycle states. See: |LayerTreeLifecycle|. |
634 LayerTreeLifecycle lifecycle_; | 641 LayerTreeLifecycle lifecycle_; |
635 | 642 |
636 private: | 643 private: |
637 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 644 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
638 }; | 645 }; |
639 | 646 |
640 } // namespace cc | 647 } // namespace cc |
641 | 648 |
642 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 649 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |