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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 | 90 |
91 virtual ~LayerImpl(); | 91 virtual ~LayerImpl(); |
92 | 92 |
93 int id() const { return layer_id_; } | 93 int id() const { return layer_id_; } |
94 | 94 |
95 // Interactions with attached animations. | 95 // Interactions with attached animations. |
96 gfx::ScrollOffset ScrollOffsetForAnimation() const; | 96 gfx::ScrollOffset ScrollOffsetForAnimation() const; |
97 void OnFilterAnimated(const FilterOperations& filters); | 97 void OnFilterAnimated(const FilterOperations& filters); |
98 void OnOpacityAnimated(float opacity); | 98 void OnOpacityAnimated(float opacity); |
99 void OnTransformAnimated(const gfx::Transform& transform); | |
100 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset); | 99 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset); |
101 void OnTransformIsCurrentlyAnimatingChanged(bool is_currently_animating); | 100 void OnTransformIsCurrentlyAnimatingChanged(bool is_currently_animating); |
102 void OnTransformIsPotentiallyAnimatingChanged(bool has_potential_animation); | 101 void OnTransformIsPotentiallyAnimatingChanged(bool has_potential_animation); |
103 void OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating); | 102 void OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating); |
104 void OnOpacityIsPotentiallyAnimatingChanged(bool has_potential_animation); | 103 void OnOpacityIsPotentiallyAnimatingChanged(bool has_potential_animation); |
105 void OnFilterIsCurrentlyAnimatingChanged(bool is_currently_animating); | 104 void OnFilterIsCurrentlyAnimatingChanged(bool is_currently_animating); |
106 void OnFilterIsPotentiallyAnimatingChanged(bool has_potential_animation); | 105 void OnFilterIsPotentiallyAnimatingChanged(bool has_potential_animation); |
107 bool IsActive() const; | 106 bool IsActive() const; |
108 | 107 |
109 void DistributeScroll(ScrollState* scroll_state); | 108 void DistributeScroll(ScrollState* scroll_state); |
(...skipping 23 matching lines...) Expand all Loading... |
133 | 132 |
134 void set_should_flatten_transform_from_property_tree(bool should_flatten) { | 133 void set_should_flatten_transform_from_property_tree(bool should_flatten) { |
135 should_flatten_transform_from_property_tree_ = should_flatten; | 134 should_flatten_transform_from_property_tree_ = should_flatten; |
136 } | 135 } |
137 bool should_flatten_transform_from_property_tree() const { | 136 bool should_flatten_transform_from_property_tree() const { |
138 return should_flatten_transform_from_property_tree_; | 137 return should_flatten_transform_from_property_tree_; |
139 } | 138 } |
140 | 139 |
141 bool is_clipped() const { return draw_properties_.is_clipped; } | 140 bool is_clipped() const { return draw_properties_.is_clipped; } |
142 | 141 |
143 void UpdatePropertyTreeTransform(const gfx::Transform& transform); | |
144 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); | 142 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); |
145 void UpdatePropertyTreeOpacity(float opacity); | 143 void UpdatePropertyTreeOpacity(float opacity); |
146 void UpdatePropertyTreeScrollOffset(); | 144 void UpdatePropertyTreeScrollOffset(); |
147 | 145 |
148 // For compatibility with Layer. | 146 // For compatibility with Layer. |
149 bool has_render_surface() const { return !!render_surface(); } | 147 bool has_render_surface() const { return !!render_surface(); } |
150 | 148 |
151 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } | 149 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } |
152 | 150 |
153 void PopulateSharedQuadState(SharedQuadState* state) const; | 151 void PopulateSharedQuadState(SharedQuadState* state) const; |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 bool scrolls_drawn_descendant_ : 1; | 581 bool scrolls_drawn_descendant_ : 1; |
584 bool has_will_change_transform_hint_ : 1; | 582 bool has_will_change_transform_hint_ : 1; |
585 bool needs_push_properties_ : 1; | 583 bool needs_push_properties_ : 1; |
586 | 584 |
587 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 585 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
588 }; | 586 }; |
589 | 587 |
590 } // namespace cc | 588 } // namespace cc |
591 | 589 |
592 #endif // CC_LAYERS_LAYER_IMPL_H_ | 590 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |