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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 287 |
288 // These return the size of the root scrollable area and the size of | 288 // These return the size of the root scrollable area and the size of |
289 // the user-visible scrolling viewport, in CSS layout coordinates. | 289 // the user-visible scrolling viewport, in CSS layout coordinates. |
290 gfx::SizeF ScrollableSize() const; | 290 gfx::SizeF ScrollableSize() const; |
291 gfx::SizeF ScrollableViewportSize() const; | 291 gfx::SizeF ScrollableViewportSize() const; |
292 | 292 |
293 gfx::Rect RootScrollLayerDeviceViewportBounds() const; | 293 gfx::Rect RootScrollLayerDeviceViewportBounds() const; |
294 | 294 |
295 LayerImpl* LayerById(int id) const; | 295 LayerImpl* LayerById(int id) const; |
296 | 296 |
297 // TODO(vollick): this is deprecated. It is used by | 297 int LayerIdByElementId(ElementId element_id) const; |
| 298 // TODO(jaydasika): this is deprecated. It is used by |
298 // animation/compositor-worker to look up layers to mutate, but in future, we | 299 // animation/compositor-worker to look up layers to mutate, but in future, we |
299 // will update property trees. | 300 // will update property trees. |
300 LayerImpl* LayerByElementId(ElementId element_id) const; | 301 LayerImpl* LayerByElementId(ElementId element_id) const; |
301 void AddToElementMap(LayerImpl* layer); | 302 void AddToElementMap(LayerImpl* layer); |
302 void RemoveFromElementMap(LayerImpl* layer); | 303 void RemoveFromElementMap(LayerImpl* layer); |
303 | 304 |
304 void AddLayerShouldPushProperties(LayerImpl* layer); | 305 void AddLayerShouldPushProperties(LayerImpl* layer); |
305 void RemoveLayerShouldPushProperties(LayerImpl* layer); | 306 void RemoveLayerShouldPushProperties(LayerImpl* layer); |
306 std::unordered_set<LayerImpl*>& LayersThatShouldPushProperties(); | 307 std::unordered_set<LayerImpl*>& LayersThatShouldPushProperties(); |
307 bool LayerNeedsPushPropertiesForTesting(LayerImpl* layer); | 308 bool LayerNeedsPushPropertiesForTesting(LayerImpl* layer); |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 float painted_device_scale_factor_; | 491 float painted_device_scale_factor_; |
491 | 492 |
492 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; | 493 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; |
493 | 494 |
494 std::unique_ptr<OwnedLayerImplList> layers_; | 495 std::unique_ptr<OwnedLayerImplList> layers_; |
495 LayerImplMap layer_id_map_; | 496 LayerImplMap layer_id_map_; |
496 LayerImplList layer_list_; | 497 LayerImplList layer_list_; |
497 // Set of layers that need to push properties. | 498 // Set of layers that need to push properties. |
498 std::unordered_set<LayerImpl*> layers_that_should_push_properties_; | 499 std::unordered_set<LayerImpl*> layers_that_should_push_properties_; |
499 | 500 |
500 std::unordered_map<ElementId, LayerImpl*, ElementIdHash> element_layers_map_; | 501 std::unordered_map<ElementId, int, ElementIdHash> element_layers_map_; |
501 | 502 |
502 std::unordered_map<int, float> opacity_animations_map_; | 503 std::unordered_map<int, float> opacity_animations_map_; |
503 std::unordered_map<int, gfx::Transform> transform_animations_map_; | 504 std::unordered_map<int, gfx::Transform> transform_animations_map_; |
504 std::unordered_map<int, FilterOperations> filter_animations_map_; | 505 std::unordered_map<int, FilterOperations> filter_animations_map_; |
505 | 506 |
506 // Maps from clip layer ids to scroll layer ids. Note that this only includes | 507 // Maps from clip layer ids to scroll layer ids. Note that this only includes |
507 // the subset of clip layers that act as scrolling containers. (This is | 508 // the subset of clip layers that act as scrolling containers. (This is |
508 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.) | 509 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.) |
509 std::unordered_map<int, int> clip_scroll_map_; | 510 std::unordered_map<int, int> clip_scroll_map_; |
510 | 511 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 | 556 |
556 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 557 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
557 | 558 |
558 private: | 559 private: |
559 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 560 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
560 }; | 561 }; |
561 | 562 |
562 } // namespace cc | 563 } // namespace cc |
563 | 564 |
564 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 565 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |