| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 gfx::Size* resource_size) const; | 201 gfx::Size* resource_size) const; |
| 202 | 202 |
| 203 virtual void NotifyTileStateChanged(const Tile* tile) {} | 203 virtual void NotifyTileStateChanged(const Tile* tile) {} |
| 204 | 204 |
| 205 virtual ScrollbarLayerImplBase* ToScrollbarLayer(); | 205 virtual ScrollbarLayerImplBase* ToScrollbarLayer(); |
| 206 | 206 |
| 207 // Returns true if this layer has content to draw. | 207 // Returns true if this layer has content to draw. |
| 208 void SetDrawsContent(bool draws_content); | 208 void SetDrawsContent(bool draws_content); |
| 209 bool DrawsContent() const { return draws_content_; } | 209 bool DrawsContent() const { return draws_content_; } |
| 210 | 210 |
| 211 void SetHideLayerAndSubtree(bool hide); | |
| 212 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; } | |
| 213 | |
| 214 LayerImplTestProperties* test_properties() { | 211 LayerImplTestProperties* test_properties() { |
| 215 if (!test_properties_) | 212 if (!test_properties_) |
| 216 test_properties_.reset(new LayerImplTestProperties()); | 213 test_properties_.reset(new LayerImplTestProperties()); |
| 217 return test_properties_.get(); | 214 return test_properties_.get(); |
| 218 } | 215 } |
| 219 | 216 |
| 220 void SetBackgroundColor(SkColor background_color); | 217 void SetBackgroundColor(SkColor background_color); |
| 221 SkColor background_color() const { return background_color_; } | 218 SkColor background_color() const { return background_color_; } |
| 222 void SetSafeOpaqueBackgroundColor(SkColor background_color); | 219 void SetSafeOpaqueBackgroundColor(SkColor background_color); |
| 223 // If contents_opaque(), return an opaque color else return a | 220 // If contents_opaque(), return an opaque color else return a |
| (...skipping 12 matching lines...) Expand all Loading... |
| 236 } | 233 } |
| 237 | 234 |
| 238 void SetMasksToBounds(bool masks_to_bounds); | 235 void SetMasksToBounds(bool masks_to_bounds); |
| 239 bool masks_to_bounds() const { return masks_to_bounds_; } | 236 bool masks_to_bounds() const { return masks_to_bounds_; } |
| 240 | 237 |
| 241 void SetContentsOpaque(bool opaque); | 238 void SetContentsOpaque(bool opaque); |
| 242 bool contents_opaque() const { return contents_opaque_; } | 239 bool contents_opaque() const { return contents_opaque_; } |
| 243 | 240 |
| 244 void SetOpacity(float opacity); | 241 void SetOpacity(float opacity); |
| 245 float opacity() const { return opacity_; } | 242 float opacity() const { return opacity_; } |
| 246 float EffectiveOpacity() const; | |
| 247 bool OpacityIsAnimating() const; | 243 bool OpacityIsAnimating() const; |
| 248 bool HasPotentiallyRunningOpacityAnimation() const; | 244 bool HasPotentiallyRunningOpacityAnimation() const; |
| 249 bool OpacityIsAnimatingOnImplOnly() const; | 245 bool OpacityIsAnimatingOnImplOnly() const; |
| 250 | 246 |
| 251 void SetElementId(uint64_t element_id); | 247 void SetElementId(uint64_t element_id); |
| 252 uint64_t element_id() const { return element_id_; } | 248 uint64_t element_id() const { return element_id_; } |
| 253 | 249 |
| 254 void SetMutableProperties(uint32_t properties); | 250 void SetMutableProperties(uint32_t properties); |
| 255 uint32_t mutable_properties() const { return mutable_properties_; } | 251 uint32_t mutable_properties() const { return mutable_properties_; } |
| 256 | 252 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 // Tracks if drawing-related properties have changed since last redraw. | 591 // Tracks if drawing-related properties have changed since last redraw. |
| 596 bool layer_property_changed_ : 1; | 592 bool layer_property_changed_ : 1; |
| 597 | 593 |
| 598 bool masks_to_bounds_ : 1; | 594 bool masks_to_bounds_ : 1; |
| 599 bool contents_opaque_ : 1; | 595 bool contents_opaque_ : 1; |
| 600 bool use_parent_backface_visibility_ : 1; | 596 bool use_parent_backface_visibility_ : 1; |
| 601 bool use_local_transform_for_backface_visibility_ : 1; | 597 bool use_local_transform_for_backface_visibility_ : 1; |
| 602 bool should_check_backface_visibility_ : 1; | 598 bool should_check_backface_visibility_ : 1; |
| 603 bool draws_content_ : 1; | 599 bool draws_content_ : 1; |
| 604 bool is_drawn_render_surface_layer_list_member_ : 1; | 600 bool is_drawn_render_surface_layer_list_member_ : 1; |
| 605 bool hide_layer_and_subtree_ : 1; | |
| 606 | 601 |
| 607 bool is_affected_by_page_scale_ : 1; | 602 bool is_affected_by_page_scale_ : 1; |
| 608 | 603 |
| 609 // This is true if and only if the layer was ever ready since it last animated | 604 // This is true if and only if the layer was ever ready since it last animated |
| 610 // (all content was complete). | 605 // (all content was complete). |
| 611 bool was_ever_ready_since_last_transform_animation_ : 1; | 606 bool was_ever_ready_since_last_transform_animation_ : 1; |
| 612 | 607 |
| 613 Region non_fast_scrollable_region_; | 608 Region non_fast_scrollable_region_; |
| 614 Region touch_event_handler_region_; | 609 Region touch_event_handler_region_; |
| 615 SkColor background_color_; | 610 SkColor background_color_; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 bool scrolls_drawn_descendant_; | 664 bool scrolls_drawn_descendant_; |
| 670 // If true, the layer or one of its descendants has a touch handler. | 665 // If true, the layer or one of its descendants has a touch handler. |
| 671 bool layer_or_descendant_has_touch_handler_; | 666 bool layer_or_descendant_has_touch_handler_; |
| 672 | 667 |
| 673 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 668 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 674 }; | 669 }; |
| 675 | 670 |
| 676 } // namespace cc | 671 } // namespace cc |
| 677 | 672 |
| 678 #endif // CC_LAYERS_LAYER_IMPL_H_ | 673 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |