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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 return base::WrapUnique(new LayerImpl(tree_impl, id)); | 88 return base::WrapUnique(new LayerImpl(tree_impl, id)); |
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 OnTransformAnimated(const gfx::Transform& transform); | |
99 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset); | 98 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset); |
100 void OnTransformIsCurrentlyAnimatingChanged(bool is_currently_animating); | 99 void OnTransformIsCurrentlyAnimatingChanged(bool is_currently_animating); |
101 void OnTransformIsPotentiallyAnimatingChanged(bool has_potential_animation); | 100 void OnTransformIsPotentiallyAnimatingChanged(bool has_potential_animation); |
102 void OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating); | 101 void OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating); |
103 void OnOpacityIsPotentiallyAnimatingChanged(bool has_potential_animation); | 102 void OnOpacityIsPotentiallyAnimatingChanged(bool has_potential_animation); |
104 void OnFilterIsCurrentlyAnimatingChanged(bool is_currently_animating); | 103 void OnFilterIsCurrentlyAnimatingChanged(bool is_currently_animating); |
105 void OnFilterIsPotentiallyAnimatingChanged(bool has_potential_animation); | 104 void OnFilterIsPotentiallyAnimatingChanged(bool has_potential_animation); |
106 bool IsActive() const; | 105 bool IsActive() const; |
107 | 106 |
108 void DistributeScroll(ScrollState* scroll_state); | 107 void DistributeScroll(ScrollState* scroll_state); |
(...skipping 23 matching lines...) Expand all Loading... |
132 | 131 |
133 void set_should_flatten_transform_from_property_tree(bool should_flatten) { | 132 void set_should_flatten_transform_from_property_tree(bool should_flatten) { |
134 should_flatten_transform_from_property_tree_ = should_flatten; | 133 should_flatten_transform_from_property_tree_ = should_flatten; |
135 } | 134 } |
136 bool should_flatten_transform_from_property_tree() const { | 135 bool should_flatten_transform_from_property_tree() const { |
137 return should_flatten_transform_from_property_tree_; | 136 return should_flatten_transform_from_property_tree_; |
138 } | 137 } |
139 | 138 |
140 bool is_clipped() const { return draw_properties_.is_clipped; } | 139 bool is_clipped() const { return draw_properties_.is_clipped; } |
141 | 140 |
142 void UpdatePropertyTreeTransform(const gfx::Transform& transform); | |
143 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); | 141 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); |
144 void UpdatePropertyTreeScrollOffset(); | 142 void UpdatePropertyTreeScrollOffset(); |
145 | 143 |
146 // For compatibility with Layer. | 144 // For compatibility with Layer. |
147 bool has_render_surface() const { return !!render_surface(); } | 145 bool has_render_surface() const { return !!render_surface(); } |
148 | 146 |
149 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } | 147 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } |
150 | 148 |
151 void PopulateSharedQuadState(SharedQuadState* state) const; | 149 void PopulateSharedQuadState(SharedQuadState* state) const; |
152 void PopulateScaledSharedQuadState(SharedQuadState* state, float scale) const; | 150 void PopulateScaledSharedQuadState(SharedQuadState* state, float scale) const; |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 bool scrolls_drawn_descendant_ : 1; | 579 bool scrolls_drawn_descendant_ : 1; |
582 bool has_will_change_transform_hint_ : 1; | 580 bool has_will_change_transform_hint_ : 1; |
583 bool needs_push_properties_ : 1; | 581 bool needs_push_properties_ : 1; |
584 | 582 |
585 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 583 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
586 }; | 584 }; |
587 | 585 |
588 } // namespace cc | 586 } // namespace cc |
589 | 587 |
590 #endif // CC_LAYERS_LAYER_IMPL_H_ | 588 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |