| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 static std::unique_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) { | 78 static std::unique_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) { |
| 79 return base::WrapUnique(new LayerImpl(tree_impl, id)); | 79 return base::WrapUnique(new LayerImpl(tree_impl, id)); |
| 80 } | 80 } |
| 81 | 81 |
| 82 virtual ~LayerImpl(); | 82 virtual ~LayerImpl(); |
| 83 | 83 |
| 84 int id() const { return layer_id_; } | 84 int id() const { return layer_id_; } |
| 85 | 85 |
| 86 // Interactions with attached animations. | 86 // Interactions with attached animations. |
| 87 gfx::ScrollOffset ScrollOffsetForAnimation() const; | 87 gfx::ScrollOffset ScrollOffsetForAnimation() const; |
| 88 void OnIsAnimatingChanged(const PropertyAnimationState& mask, | |
| 89 const PropertyAnimationState& state); | |
| 90 bool IsActive() const; | 88 bool IsActive() const; |
| 91 | 89 |
| 92 void set_property_tree_sequence_number(int sequence_number) {} | 90 void set_property_tree_sequence_number(int sequence_number) {} |
| 93 | 91 |
| 94 void SetTransformTreeIndex(int index); | 92 void SetTransformTreeIndex(int index); |
| 95 int transform_tree_index() const { return transform_tree_index_; } | 93 int transform_tree_index() const { return transform_tree_index_; } |
| 96 | 94 |
| 97 void SetClipTreeIndex(int index); | 95 void SetClipTreeIndex(int index); |
| 98 int clip_tree_index() const { return clip_tree_index_; } | 96 int clip_tree_index() const { return clip_tree_index_; } |
| 99 | 97 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 113 | 111 |
| 114 void set_should_flatten_transform_from_property_tree(bool should_flatten) { | 112 void set_should_flatten_transform_from_property_tree(bool should_flatten) { |
| 115 should_flatten_transform_from_property_tree_ = should_flatten; | 113 should_flatten_transform_from_property_tree_ = should_flatten; |
| 116 } | 114 } |
| 117 bool should_flatten_transform_from_property_tree() const { | 115 bool should_flatten_transform_from_property_tree() const { |
| 118 return should_flatten_transform_from_property_tree_; | 116 return should_flatten_transform_from_property_tree_; |
| 119 } | 117 } |
| 120 | 118 |
| 121 bool is_clipped() const { return draw_properties_.is_clipped; } | 119 bool is_clipped() const { return draw_properties_.is_clipped; } |
| 122 | 120 |
| 123 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); | |
| 124 void UpdatePropertyTreeScrollOffset(); | 121 void UpdatePropertyTreeScrollOffset(); |
| 125 | 122 |
| 126 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } | 123 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } |
| 127 | 124 |
| 128 void PopulateSharedQuadState(SharedQuadState* state) const; | 125 void PopulateSharedQuadState(SharedQuadState* state) const; |
| 129 void PopulateScaledSharedQuadState(SharedQuadState* state, | 126 void PopulateScaledSharedQuadState(SharedQuadState* state, |
| 130 float layer_to_content_scale_x, | 127 float layer_to_content_scale_x, |
| 131 float layer_to_content_scale_y) const; | 128 float layer_to_content_scale_y) const; |
| 132 // WillDraw must be called before AppendQuads. If WillDraw returns false, | 129 // WillDraw must be called before AppendQuads. If WillDraw returns false, |
| 133 // AppendQuads and DidDraw will not be called. If WillDraw returns true, | 130 // AppendQuads and DidDraw will not be called. If WillDraw returns true, |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 bool has_will_change_transform_hint_ : 1; | 555 bool has_will_change_transform_hint_ : 1; |
| 559 bool needs_push_properties_ : 1; | 556 bool needs_push_properties_ : 1; |
| 560 bool scrollbars_hidden_ : 1; | 557 bool scrollbars_hidden_ : 1; |
| 561 | 558 |
| 562 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 559 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 563 }; | 560 }; |
| 564 | 561 |
| 565 } // namespace cc | 562 } // namespace cc |
| 566 | 563 |
| 567 #endif // CC_LAYERS_LAYER_IMPL_H_ | 564 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |