| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
| 6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 void SetMutableProperties(uint32_t properties); | 471 void SetMutableProperties(uint32_t properties); |
| 472 uint32_t mutable_properties() const { return inputs_.mutable_properties; } | 472 uint32_t mutable_properties() const { return inputs_.mutable_properties; } |
| 473 | 473 |
| 474 bool HasActiveAnimationForTesting() const; | 474 bool HasActiveAnimationForTesting() const; |
| 475 | 475 |
| 476 void SetHasWillChangeTransformHint(bool has_will_change); | 476 void SetHasWillChangeTransformHint(bool has_will_change); |
| 477 bool has_will_change_transform_hint() const { | 477 bool has_will_change_transform_hint() const { |
| 478 return inputs_.has_will_change_transform_hint; | 478 return inputs_.has_will_change_transform_hint; |
| 479 } | 479 } |
| 480 | 480 |
| 481 void SetPreferredRasterScale(float preferred_raster_scale); |
| 482 bool has_preferred_raster_scale() { |
| 483 return inputs_.has_preferred_raster_scale; |
| 484 } |
| 485 float preferred_raster_scale() const { |
| 486 return inputs_.preferred_raster_scale; |
| 487 } |
| 488 void ClearPreferredRasterScale(); |
| 489 |
| 481 AnimationHost* GetAnimationHost() const; | 490 AnimationHost* GetAnimationHost() const; |
| 482 | 491 |
| 483 ElementListType GetElementTypeForAnimation() const; | 492 ElementListType GetElementTypeForAnimation() const; |
| 484 | 493 |
| 485 // Tests in remote mode need to explicitly set the layer id so it matches the | 494 // Tests in remote mode need to explicitly set the layer id so it matches the |
| 486 // layer id for the corresponding Layer on the engine. | 495 // layer id for the corresponding Layer on the engine. |
| 487 void SetLayerIdForTesting(int id); | 496 void SetLayerIdForTesting(int id); |
| 488 | 497 |
| 489 protected: | 498 protected: |
| 490 friend class LayerImpl; | 499 friend class LayerImpl; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 LayerStickyPositionConstraint sticky_position_constraint; | 673 LayerStickyPositionConstraint sticky_position_constraint; |
| 665 | 674 |
| 666 ElementId element_id; | 675 ElementId element_id; |
| 667 | 676 |
| 668 uint32_t mutable_properties; | 677 uint32_t mutable_properties; |
| 669 | 678 |
| 670 Layer* scroll_parent; | 679 Layer* scroll_parent; |
| 671 Layer* clip_parent; | 680 Layer* clip_parent; |
| 672 | 681 |
| 673 bool has_will_change_transform_hint : 1; | 682 bool has_will_change_transform_hint : 1; |
| 683 bool has_preferred_raster_scale : 1; |
| 674 | 684 |
| 675 bool hide_layer_and_subtree : 1; | 685 bool hide_layer_and_subtree : 1; |
| 676 | 686 |
| 677 // The following elements can not and are not serialized. | 687 // The following elements can not and are not serialized. |
| 678 LayerClient* client; | 688 LayerClient* client; |
| 679 base::Closure did_scroll_callback; | 689 base::Closure did_scroll_callback; |
| 680 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests; | 690 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests; |
| 691 |
| 692 float preferred_raster_scale; |
| 681 }; | 693 }; |
| 682 | 694 |
| 683 Layer* parent_; | 695 Layer* parent_; |
| 684 | 696 |
| 685 // Layer instances have a weak pointer to their LayerTreeHost. | 697 // Layer instances have a weak pointer to their LayerTreeHost. |
| 686 // This pointer value is nil when a Layer is not in a tree and is | 698 // This pointer value is nil when a Layer is not in a tree and is |
| 687 // updated via SetLayerTreeHost() if a layer moves between trees. | 699 // updated via SetLayerTreeHost() if a layer moves between trees. |
| 688 LayerTreeHost* layer_tree_host_; | 700 LayerTreeHost* layer_tree_host_; |
| 689 LayerTree* layer_tree_; | 701 LayerTree* layer_tree_; |
| 690 | 702 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 717 // These all act like draw properties, so don't need push properties. | 729 // These all act like draw properties, so don't need push properties. |
| 718 gfx::Rect visible_layer_rect_; | 730 gfx::Rect visible_layer_rect_; |
| 719 size_t num_unclipped_descendants_; | 731 size_t num_unclipped_descendants_; |
| 720 | 732 |
| 721 DISALLOW_COPY_AND_ASSIGN(Layer); | 733 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 722 }; | 734 }; |
| 723 | 735 |
| 724 } // namespace cc | 736 } // namespace cc |
| 725 | 737 |
| 726 #endif // CC_LAYERS_LAYER_H_ | 738 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |