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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 bool should_flatten_transform_from_property_tree() const { | 117 bool should_flatten_transform_from_property_tree() const { |
118 return should_flatten_transform_from_property_tree_; | 118 return should_flatten_transform_from_property_tree_; |
119 } | 119 } |
120 | 120 |
121 bool is_clipped() const { return draw_properties_.is_clipped; } | 121 bool is_clipped() const { return draw_properties_.is_clipped; } |
122 | 122 |
123 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); | 123 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); |
124 void UpdatePropertyTreeScrollOffset(); | 124 void UpdatePropertyTreeScrollOffset(); |
125 | 125 |
126 // For compatibility with Layer. | |
127 bool has_render_surface() const { return !!render_surface(); } | |
128 | |
129 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } | 126 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } |
130 | 127 |
131 void PopulateSharedQuadState(SharedQuadState* state) const; | 128 void PopulateSharedQuadState(SharedQuadState* state) const; |
132 void PopulateScaledSharedQuadState(SharedQuadState* state, | 129 void PopulateScaledSharedQuadState(SharedQuadState* state, |
133 float layer_to_content_scale_x, | 130 float layer_to_content_scale_x, |
134 float layer_to_content_scale_y) const; | 131 float layer_to_content_scale_y) const; |
135 // WillDraw must be called before AppendQuads. If WillDraw returns false, | 132 // WillDraw must be called before AppendQuads. If WillDraw returns false, |
136 // AppendQuads and DidDraw will not be called. If WillDraw returns true, | 133 // AppendQuads and DidDraw will not be called. If WillDraw returns true, |
137 // DidDraw is guaranteed to be called before another WillDraw or before | 134 // DidDraw is guaranteed to be called before another WillDraw or before |
138 // the layer is destroyed. To enforce this, any class that overrides | 135 // the layer is destroyed. To enforce this, any class that overrides |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 220 |
224 void SetShouldCheckBackfaceVisibility(bool should_check_backface_visibility) { | 221 void SetShouldCheckBackfaceVisibility(bool should_check_backface_visibility) { |
225 should_check_backface_visibility_ = should_check_backface_visibility; | 222 should_check_backface_visibility_ = should_check_backface_visibility; |
226 } | 223 } |
227 bool should_check_backface_visibility() const { | 224 bool should_check_backface_visibility() const { |
228 return should_check_backface_visibility_; | 225 return should_check_backface_visibility_; |
229 } | 226 } |
230 | 227 |
231 bool ShowDebugBorders() const; | 228 bool ShowDebugBorders() const; |
232 | 229 |
233 RenderSurfaceImpl* render_surface() const; | 230 RenderSurfaceImpl* GetRenderSurface() const; |
234 | 231 |
235 // The render surface which this layer draws into. This can be either owned by | 232 // The render surface which this layer draws into. This can be either owned by |
236 // the same layer or an ancestor of this layer. | 233 // the same layer or an ancestor of this layer. |
237 RenderSurfaceImpl* render_target(); | 234 RenderSurfaceImpl* render_target(); |
238 const RenderSurfaceImpl* render_target() const; | 235 const RenderSurfaceImpl* render_target() const; |
239 | 236 |
240 DrawProperties& draw_properties() { return draw_properties_; } | 237 DrawProperties& draw_properties() { return draw_properties_; } |
241 const DrawProperties& draw_properties() const { return draw_properties_; } | 238 const DrawProperties& draw_properties() const { return draw_properties_; } |
242 | 239 |
243 gfx::Transform DrawTransform() const; | 240 gfx::Transform DrawTransform() const; |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 bool has_will_change_transform_hint_ : 1; | 566 bool has_will_change_transform_hint_ : 1; |
570 bool needs_push_properties_ : 1; | 567 bool needs_push_properties_ : 1; |
571 bool scrollbars_hidden_ : 1; | 568 bool scrollbars_hidden_ : 1; |
572 | 569 |
573 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 570 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
574 }; | 571 }; |
575 | 572 |
576 } // namespace cc | 573 } // namespace cc |
577 | 574 |
578 #endif // CC_LAYERS_LAYER_IMPL_H_ | 575 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |