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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // Transform and opacity mutations apply to this layer. | 157 // Transform and opacity mutations apply to this layer. |
158 LayerImpl* main = nullptr; | 158 LayerImpl* main = nullptr; |
159 // Scroll mutations apply to this layer. | 159 // Scroll mutations apply to this layer. |
160 LayerImpl* scroll = nullptr; | 160 LayerImpl* scroll = nullptr; |
161 }; | 161 }; |
162 | 162 |
163 void AddToElementMap(LayerImpl* layer); | 163 void AddToElementMap(LayerImpl* layer); |
164 void RemoveFromElementMap(LayerImpl* layer); | 164 void RemoveFromElementMap(LayerImpl* layer); |
165 | 165 |
166 void AddToOpacityAnimationsMap(int id, float opacity); | 166 void AddToOpacityAnimationsMap(int id, float opacity); |
| 167 void AddToTransformAnimationsMap(int id, gfx::Transform transform); |
167 | 168 |
168 ElementLayers GetMutableLayers(uint64_t element_id); | 169 ElementLayers GetMutableLayers(uint64_t element_id); |
169 int source_frame_number() const { return source_frame_number_; } | 170 int source_frame_number() const { return source_frame_number_; } |
170 void set_source_frame_number(int frame_number) { | 171 void set_source_frame_number(int frame_number) { |
171 source_frame_number_ = frame_number; | 172 source_frame_number_ = frame_number; |
172 } | 173 } |
173 | 174 |
174 bool is_first_frame_after_commit() const { | 175 bool is_first_frame_after_commit() const { |
175 return source_frame_number_ != is_first_frame_after_commit_tracker_; | 176 return source_frame_number_ != is_first_frame_after_commit_tracker_; |
176 } | 177 } |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; | 513 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; |
513 | 514 |
514 std::unique_ptr<OwnedLayerImplList> layers_; | 515 std::unique_ptr<OwnedLayerImplList> layers_; |
515 LayerImplMap layer_id_map_; | 516 LayerImplMap layer_id_map_; |
516 // Set of layers that need to push properties. | 517 // Set of layers that need to push properties. |
517 std::unordered_set<LayerImpl*> layers_that_should_push_properties_; | 518 std::unordered_set<LayerImpl*> layers_that_should_push_properties_; |
518 | 519 |
519 std::unordered_map<uint64_t, ElementLayers> element_layers_map_; | 520 std::unordered_map<uint64_t, ElementLayers> element_layers_map_; |
520 | 521 |
521 std::unordered_map<int, float> opacity_animations_map_; | 522 std::unordered_map<int, float> opacity_animations_map_; |
| 523 std::unordered_map<int, gfx::Transform> transform_animations_map_; |
522 | 524 |
523 // Maps from clip layer ids to scroll layer ids. Note that this only includes | 525 // Maps from clip layer ids to scroll layer ids. Note that this only includes |
524 // the subset of clip layers that act as scrolling containers. (This is | 526 // the subset of clip layers that act as scrolling containers. (This is |
525 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.) | 527 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.) |
526 std::unordered_map<int, int> clip_scroll_map_; | 528 std::unordered_map<int, int> clip_scroll_map_; |
527 | 529 |
528 // Maps scroll layer ids to scrollbar layer ids. For each scroll layer, there | 530 // Maps scroll layer ids to scrollbar layer ids. For each scroll layer, there |
529 // may be 1 or 2 scrollbar layers (for vertical and horizontal). (This is | 531 // may be 1 or 2 scrollbar layers (for vertical and horizontal). (This is |
530 // derived from ScrollbarLayerImplBase::scroll_layer_id_ and exists to avoid | 532 // derived from ScrollbarLayerImplBase::scroll_layer_id_ and exists to avoid |
531 // O(n) walks.) | 533 // O(n) walks.) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 | 573 |
572 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 574 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
573 | 575 |
574 private: | 576 private: |
575 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 577 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
576 }; | 578 }; |
577 | 579 |
578 } // namespace cc | 580 } // namespace cc |
579 | 581 |
580 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 582 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |