| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TREES_PROPERTY_TREE_H_ | 5 #ifndef CC_TREES_PROPERTY_TREE_H_ |
| 6 #define CC_TREES_PROPERTY_TREE_H_ | 6 #define CC_TREES_PROPERTY_TREE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 class ClipNodeData; | 29 class ClipNodeData; |
| 30 class EffectNodeData; | 30 class EffectNodeData; |
| 31 class PropertyTree; | 31 class PropertyTree; |
| 32 class PropertyTrees; | 32 class PropertyTrees; |
| 33 class ScrollNodeData; | 33 class ScrollNodeData; |
| 34 class TranformNodeData; | 34 class TranformNodeData; |
| 35 class TransformTreeData; | 35 class TransformTreeData; |
| 36 class TreeNode; | 36 class TreeNode; |
| 37 } | 37 } |
| 38 | 38 |
| 39 class CopyOutputRequest; |
| 39 class LayerTreeImpl; | 40 class LayerTreeImpl; |
| 40 class RenderSurfaceImpl; | 41 class RenderSurfaceImpl; |
| 41 class ScrollState; | 42 class ScrollState; |
| 42 struct ScrollAndScaleSet; | 43 struct ScrollAndScaleSet; |
| 43 | 44 |
| 44 // ------------------------------*IMPORTANT*--------------------------------- | 45 // ------------------------------*IMPORTANT*--------------------------------- |
| 45 // Each class declared here has a corresponding proto defined in | 46 // Each class declared here has a corresponding proto defined in |
| 46 // cc/proto/property_tree.proto. When making any changes to a class structure | 47 // cc/proto/property_tree.proto. When making any changes to a class structure |
| 47 // including addition/deletion/updation of a field, please also make the | 48 // including addition/deletion/updation of a field, please also make the |
| 48 // change to its proto and the ToProtobuf and FromProtobuf methods for that | 49 // change to its proto and the ToProtobuf and FromProtobuf methods for that |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 void SetViewportClip(gfx::RectF viewport_rect); | 564 void SetViewportClip(gfx::RectF viewport_rect); |
| 564 gfx::RectF ViewportClip(); | 565 gfx::RectF ViewportClip(); |
| 565 | 566 |
| 566 void ToProtobuf(proto::PropertyTree* proto) const; | 567 void ToProtobuf(proto::PropertyTree* proto) const; |
| 567 void FromProtobuf(const proto::PropertyTree& proto, | 568 void FromProtobuf(const proto::PropertyTree& proto, |
| 568 std::unordered_map<int, int>* node_id_to_index_map); | 569 std::unordered_map<int, int>* node_id_to_index_map); |
| 569 }; | 570 }; |
| 570 | 571 |
| 571 class CC_EXPORT EffectTree final : public PropertyTree<EffectNode> { | 572 class CC_EXPORT EffectTree final : public PropertyTree<EffectNode> { |
| 572 public: | 573 public: |
| 574 EffectTree(); |
| 575 ~EffectTree(); |
| 576 |
| 577 EffectTree& operator=(const EffectTree& from); |
| 573 bool operator==(const EffectTree& other) const; | 578 bool operator==(const EffectTree& other) const; |
| 574 | 579 |
| 575 float EffectiveOpacity(const EffectNode* node) const; | 580 float EffectiveOpacity(const EffectNode* node) const; |
| 576 | 581 |
| 577 void UpdateEffects(int id); | 582 void UpdateEffects(int id); |
| 578 | 583 |
| 579 void UpdateEffectChanged(EffectNode* node, EffectNode* parent_node); | 584 void UpdateEffectChanged(EffectNode* node, EffectNode* parent_node); |
| 580 | 585 |
| 586 void AddCopyRequest(int node_id, std::unique_ptr<CopyOutputRequest> request); |
| 587 void PushCopyRequestsTo(EffectTree* other_tree); |
| 588 void TakeCopyRequestsAndTransformToSurface( |
| 589 int node_id, |
| 590 std::vector<std::unique_ptr<CopyOutputRequest>>* requests); |
| 591 bool HasCopyRequests() const; |
| 581 void ClearCopyRequests(); | 592 void ClearCopyRequests(); |
| 582 | 593 |
| 583 bool ContributesToDrawnSurface(int id); | 594 bool ContributesToDrawnSurface(int id); |
| 584 | 595 |
| 585 void ResetChangeTracking(); | 596 void ResetChangeTracking(); |
| 586 | 597 |
| 587 void ToProtobuf(proto::PropertyTree* proto) const; | 598 void ToProtobuf(proto::PropertyTree* proto) const; |
| 588 void FromProtobuf(const proto::PropertyTree& proto, | 599 void FromProtobuf(const proto::PropertyTree& proto, |
| 589 std::unordered_map<int, int>* node_id_to_index_map); | 600 std::unordered_map<int, int>* node_id_to_index_map); |
| 590 | 601 |
| 591 private: | 602 private: |
| 592 void UpdateOpacities(EffectNode* node, EffectNode* parent_node); | 603 void UpdateOpacities(EffectNode* node, EffectNode* parent_node); |
| 593 void UpdateIsDrawn(EffectNode* node, EffectNode* parent_node); | 604 void UpdateIsDrawn(EffectNode* node, EffectNode* parent_node); |
| 594 void UpdateBackfaceVisibility(EffectNode* node, EffectNode* parent_node); | 605 void UpdateBackfaceVisibility(EffectNode* node, EffectNode* parent_node); |
| 606 |
| 607 // Stores copy requests, keyed by node id. |
| 608 std::unordered_multimap<int, std::unique_ptr<CopyOutputRequest>> |
| 609 copy_requests_; |
| 595 }; | 610 }; |
| 596 | 611 |
| 597 class CC_EXPORT ScrollTree final : public PropertyTree<ScrollNode> { | 612 class CC_EXPORT ScrollTree final : public PropertyTree<ScrollNode> { |
| 598 public: | 613 public: |
| 599 ScrollTree(); | 614 ScrollTree(); |
| 600 ~ScrollTree(); | 615 ~ScrollTree(); |
| 601 | 616 |
| 602 ScrollTree& operator=(const ScrollTree& from); | 617 ScrollTree& operator=(const ScrollTree& from); |
| 603 bool operator==(const ScrollTree& other) const; | 618 bool operator==(const ScrollTree& other) const; |
| 604 | 619 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 | 739 |
| 725 private: | 740 private: |
| 726 gfx::Vector2dF inner_viewport_container_bounds_delta_; | 741 gfx::Vector2dF inner_viewport_container_bounds_delta_; |
| 727 gfx::Vector2dF outer_viewport_container_bounds_delta_; | 742 gfx::Vector2dF outer_viewport_container_bounds_delta_; |
| 728 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; | 743 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; |
| 729 }; | 744 }; |
| 730 | 745 |
| 731 } // namespace cc | 746 } // namespace cc |
| 732 | 747 |
| 733 #endif // CC_TREES_PROPERTY_TREE_H_ | 748 #endif // CC_TREES_PROPERTY_TREE_H_ |
| OLD | NEW |