OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_LAYERS_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 void OnOpacityAnimated(float opacity); | 95 void OnOpacityAnimated(float opacity); |
96 void OnTransformAnimated(const gfx::Transform& transform); | 96 void OnTransformAnimated(const gfx::Transform& transform); |
97 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset); | 97 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset); |
98 void OnTransformIsCurrentlyAnimatingChanged(bool is_currently_animating); | 98 void OnTransformIsCurrentlyAnimatingChanged(bool is_currently_animating); |
99 void OnTransformIsPotentiallyAnimatingChanged(bool has_potential_animation); | 99 void OnTransformIsPotentiallyAnimatingChanged(bool has_potential_animation); |
100 void OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating); | 100 void OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating); |
101 void OnOpacityIsPotentiallyAnimatingChanged(bool has_potential_animation); | 101 void OnOpacityIsPotentiallyAnimatingChanged(bool has_potential_animation); |
102 bool IsActive() const; | 102 bool IsActive() const; |
103 | 103 |
104 // Tree structure. | 104 // Tree structure. |
105 LayerImpl* parent() { return parent_; } | |
106 void AddChild(std::unique_ptr<LayerImpl> child); | 105 void AddChild(std::unique_ptr<LayerImpl> child); |
107 std::unique_ptr<LayerImpl> RemoveChildForTesting(LayerImpl* child); | 106 std::unique_ptr<LayerImpl> RemoveChildForTesting(LayerImpl* child); |
108 void SetParent(LayerImpl* parent); | |
109 | 107 |
110 void DistributeScroll(ScrollState* scroll_state); | 108 void DistributeScroll(ScrollState* scroll_state); |
111 void ApplyScroll(ScrollState* scroll_state); | 109 void ApplyScroll(ScrollState* scroll_state); |
112 | 110 |
113 void set_property_tree_sequence_number(int sequence_number) {} | 111 void set_property_tree_sequence_number(int sequence_number) {} |
114 | 112 |
115 void SetTransformTreeIndex(int index); | 113 void SetTransformTreeIndex(int index); |
116 int transform_tree_index() const { return transform_tree_index_; } | 114 int transform_tree_index() const { return transform_tree_index_; } |
117 | 115 |
118 void SetClipTreeIndex(int index); | 116 void SetClipTreeIndex(int index); |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 SkColor color, | 525 SkColor color, |
528 float width) const; | 526 float width) const; |
529 | 527 |
530 gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const; | 528 gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const; |
531 | 529 |
532 private: | 530 private: |
533 void ValidateQuadResourcesInternal(DrawQuad* quad) const; | 531 void ValidateQuadResourcesInternal(DrawQuad* quad) const; |
534 | 532 |
535 virtual const char* LayerTypeAsString() const; | 533 virtual const char* LayerTypeAsString() const; |
536 | 534 |
537 // Properties internal to LayerImpl | |
538 LayerImpl* parent_; | |
539 | |
540 // mask_layer_ can be temporarily stolen during tree sync, we need this ID to | 535 // mask_layer_ can be temporarily stolen during tree sync, we need this ID to |
541 // confirm newly assigned layer is still the previous one | 536 // confirm newly assigned layer is still the previous one |
542 int mask_layer_id_; | 537 int mask_layer_id_; |
543 LayerImpl* mask_layer_; | 538 LayerImpl* mask_layer_; |
544 int replica_layer_id_; // ditto | 539 int replica_layer_id_; // ditto |
545 LayerImpl* replica_layer_; | 540 LayerImpl* replica_layer_; |
546 int layer_id_; | 541 int layer_id_; |
547 LayerTreeImpl* layer_tree_impl_; | 542 LayerTreeImpl* layer_tree_impl_; |
548 | 543 |
549 std::unique_ptr<LayerImplTestProperties> test_properties_; | 544 std::unique_ptr<LayerImplTestProperties> test_properties_; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 | 628 |
634 bool scrolls_drawn_descendant_; | 629 bool scrolls_drawn_descendant_; |
635 bool has_will_change_transform_hint_; | 630 bool has_will_change_transform_hint_; |
636 | 631 |
637 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 632 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
638 }; | 633 }; |
639 | 634 |
640 } // namespace cc | 635 } // namespace cc |
641 | 636 |
642 #endif // CC_LAYERS_LAYER_IMPL_H_ | 637 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |