| 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 |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <unordered_map> | 13 #include <unordered_map> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/callback.h" | 16 #include "base/callback.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
| 20 #include "cc/animation/element_id.h" |
| 20 #include "cc/animation/target_property.h" | 21 #include "cc/animation/target_property.h" |
| 21 #include "cc/base/cc_export.h" | 22 #include "cc/base/cc_export.h" |
| 22 #include "cc/base/region.h" | 23 #include "cc/base/region.h" |
| 23 #include "cc/debug/micro_benchmark.h" | 24 #include "cc/debug/micro_benchmark.h" |
| 24 #include "cc/input/input_handler.h" | 25 #include "cc/input/input_handler.h" |
| 25 #include "cc/layers/layer_collections.h" | 26 #include "cc/layers/layer_collections.h" |
| 26 #include "cc/layers/layer_position_constraint.h" | 27 #include "cc/layers/layer_position_constraint.h" |
| 27 #include "cc/layers/paint_properties.h" | 28 #include "cc/layers/paint_properties.h" |
| 28 #include "cc/output/filter_operations.h" | 29 #include "cc/output/filter_operations.h" |
| 29 #include "cc/trees/property_tree.h" | 30 #include "cc/trees/property_tree.h" |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 void SetSubtreePropertyChanged(); | 485 void SetSubtreePropertyChanged(); |
| 485 bool subtree_property_changed() const { return subtree_property_changed_; } | 486 bool subtree_property_changed() const { return subtree_property_changed_; } |
| 486 | 487 |
| 487 void SetLayerPropertyChanged(); | 488 void SetLayerPropertyChanged(); |
| 488 bool layer_property_changed() const { return layer_property_changed_; } | 489 bool layer_property_changed() const { return layer_property_changed_; } |
| 489 | 490 |
| 490 void DidBeginTracing(); | 491 void DidBeginTracing(); |
| 491 | 492 |
| 492 int num_copy_requests_in_target_subtree(); | 493 int num_copy_requests_in_target_subtree(); |
| 493 | 494 |
| 494 void SetElementId(uint64_t id); | 495 void SetElementId(ElementId id); |
| 495 uint64_t element_id() const { return element_id_; } | 496 ElementId element_id() const { return element_id_; } |
| 496 | 497 |
| 497 void SetMutableProperties(uint32_t properties); | 498 void SetMutableProperties(uint32_t properties); |
| 498 uint32_t mutable_properties() const { return mutable_properties_; } | 499 uint32_t mutable_properties() const { return mutable_properties_; } |
| 499 | 500 |
| 500 // Interactions with attached animations. | 501 // Interactions with attached animations. |
| 501 gfx::ScrollOffset ScrollOffsetForAnimation() const; | 502 gfx::ScrollOffset ScrollOffsetForAnimation() const; |
| 502 void OnFilterAnimated(const FilterOperations& filters); | 503 void OnFilterAnimated(const FilterOperations& filters); |
| 503 void OnOpacityAnimated(float opacity); | 504 void OnOpacityAnimated(float opacity); |
| 504 void OnTransformAnimated(const gfx::Transform& transform); | 505 void OnTransformAnimated(const gfx::Transform& transform); |
| 505 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset); | 506 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 // This variable indicates which ancestor layer (if any) whose size, | 622 // This variable indicates which ancestor layer (if any) whose size, |
| 622 // transformed relative to this layer, defines the maximum scroll offset for | 623 // transformed relative to this layer, defines the maximum scroll offset for |
| 623 // this layer. | 624 // this layer. |
| 624 int scroll_clip_layer_id_; | 625 int scroll_clip_layer_id_; |
| 625 int num_descendants_that_draw_content_; | 626 int num_descendants_that_draw_content_; |
| 626 int transform_tree_index_; | 627 int transform_tree_index_; |
| 627 int effect_tree_index_; | 628 int effect_tree_index_; |
| 628 int clip_tree_index_; | 629 int clip_tree_index_; |
| 629 int scroll_tree_index_; | 630 int scroll_tree_index_; |
| 630 int property_tree_sequence_number_; | 631 int property_tree_sequence_number_; |
| 631 uint64_t element_id_; | 632 ElementId element_id_; |
| 632 uint32_t mutable_properties_; | 633 uint32_t mutable_properties_; |
| 633 gfx::Vector2dF offset_to_transform_parent_; | 634 gfx::Vector2dF offset_to_transform_parent_; |
| 634 uint32_t main_thread_scrolling_reasons_; | 635 uint32_t main_thread_scrolling_reasons_; |
| 635 bool should_flatten_transform_from_property_tree_ : 1; | 636 bool should_flatten_transform_from_property_tree_ : 1; |
| 636 bool user_scrollable_horizontal_ : 1; | 637 bool user_scrollable_horizontal_ : 1; |
| 637 bool user_scrollable_vertical_ : 1; | 638 bool user_scrollable_vertical_ : 1; |
| 638 bool is_root_for_isolated_group_ : 1; | 639 bool is_root_for_isolated_group_ : 1; |
| 639 bool is_container_for_fixed_position_layers_ : 1; | 640 bool is_container_for_fixed_position_layers_ : 1; |
| 640 bool is_drawable_ : 1; | 641 bool is_drawable_ : 1; |
| 641 bool draws_content_ : 1; | 642 bool draws_content_ : 1; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 // These all act like draw properties, so don't need push properties. | 688 // These all act like draw properties, so don't need push properties. |
| 688 gfx::Rect visible_layer_rect_; | 689 gfx::Rect visible_layer_rect_; |
| 689 size_t num_unclipped_descendants_; | 690 size_t num_unclipped_descendants_; |
| 690 | 691 |
| 691 DISALLOW_COPY_AND_ASSIGN(Layer); | 692 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 692 }; | 693 }; |
| 693 | 694 |
| 694 } // namespace cc | 695 } // namespace cc |
| 695 | 696 |
| 696 #endif // CC_LAYERS_LAYER_H_ | 697 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |