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