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