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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 SkColor color, | 507 SkColor color, |
510 float width) const; | 508 float width) const; |
511 | 509 |
512 gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const; | 510 gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const; |
513 | 511 |
514 private: | 512 private: |
515 void ValidateQuadResourcesInternal(DrawQuad* quad) const; | 513 void ValidateQuadResourcesInternal(DrawQuad* quad) const; |
516 | 514 |
517 virtual const char* LayerTypeAsString() const; | 515 virtual const char* LayerTypeAsString() const; |
518 | 516 |
519 // Properties internal to LayerImpl | |
520 LayerImpl* parent_; | |
521 | |
522 int layer_id_; | 517 int layer_id_; |
523 LayerTreeImpl* layer_tree_impl_; | 518 LayerTreeImpl* layer_tree_impl_; |
524 | 519 |
525 std::unique_ptr<LayerImplTestProperties> test_properties_; | 520 std::unique_ptr<LayerImplTestProperties> test_properties_; |
526 | 521 |
527 gfx::Vector2dF bounds_delta_; | 522 gfx::Vector2dF bounds_delta_; |
528 | 523 |
529 // Properties synchronized from the associated Layer. | 524 // Properties synchronized from the associated Layer. |
530 gfx::Size bounds_; | 525 gfx::Size bounds_; |
531 int scroll_clip_layer_id_; | 526 int scroll_clip_layer_id_; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 | 604 |
610 bool scrolls_drawn_descendant_; | 605 bool scrolls_drawn_descendant_; |
611 bool has_will_change_transform_hint_; | 606 bool has_will_change_transform_hint_; |
612 | 607 |
613 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 608 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
614 }; | 609 }; |
615 | 610 |
616 } // namespace cc | 611 } // namespace cc |
617 | 612 |
618 #endif // CC_LAYERS_LAYER_IMPL_H_ | 613 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |