OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 PropertyTreeManager_h | 5 #ifndef PropertyTreeManager_h |
6 #define PropertyTreeManager_h | 6 #define PropertyTreeManager_h |
7 | 7 |
8 #include "wtf/HashMap.h" | 8 #include "wtf/HashMap.h" |
9 #include "wtf/HashSet.h" | 9 #include "wtf/HashSet.h" |
10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // platform/graphics/paint/README.md for more. | 68 // platform/graphics/paint/README.md for more. |
69 // | 69 // |
70 // With the above as background, we can now state more clearly a description | 70 // With the above as background, we can now state more clearly a description |
71 // of the below set of compositor node methods: they take Blink paint property | 71 // of the below set of compositor node methods: they take Blink paint property |
72 // tree nodes as input, create a corresponding compositor property tree node | 72 // tree nodes as input, create a corresponding compositor property tree node |
73 // if none yet exists, and return the compositor node's 'node id', a.k.a., | 73 // if none yet exists, and return the compositor node's 'node id', a.k.a., |
74 // 'node index'. | 74 // 'node index'. |
75 | 75 |
76 int ensureCompositorTransformNode(const TransformPaintPropertyNode*); | 76 int ensureCompositorTransformNode(const TransformPaintPropertyNode*); |
77 int ensureCompositorClipNode(const ClipPaintPropertyNode*); | 77 int ensureCompositorClipNode(const ClipPaintPropertyNode*); |
78 int ensureCompositorScrollNode(const ScrollPaintPropertyNode*); | 78 // Update the layer->scroll and scroll->layer mapping. The latter is temporary |
| 79 // until |owning_layer_id| is removed from the scroll node. |
| 80 void updateLayerScrollMapping(cc::Layer*, const TransformPaintPropertyNode*); |
79 | 81 |
80 int switchToEffectNode(const EffectPaintPropertyNode& nextEffect); | 82 int switchToEffectNode(const EffectPaintPropertyNode& nextEffect); |
81 int getCurrentCompositorEffectNodeIndex() const { | 83 int getCurrentCompositorEffectNodeIndex() const { |
82 return m_effectStack.back().id; | 84 return m_effectStack.back().id; |
83 } | 85 } |
84 | 86 |
85 private: | 87 private: |
86 void buildEffectNodesRecursively(const EffectPaintPropertyNode* nextEffect); | 88 void buildEffectNodesRecursively(const EffectPaintPropertyNode* nextEffect); |
87 | 89 |
88 cc::TransformTree& transformTree(); | 90 cc::TransformTree& transformTree(); |
89 cc::ClipTree& clipTree(); | 91 cc::ClipTree& clipTree(); |
90 cc::EffectTree& effectTree(); | 92 cc::EffectTree& effectTree(); |
91 cc::ScrollTree& scrollTree(); | 93 cc::ScrollTree& scrollTree(); |
92 | 94 |
| 95 int ensureCompositorScrollNode(const ScrollPaintPropertyNode*); |
| 96 |
93 const EffectPaintPropertyNode* currentEffectNode() const; | 97 const EffectPaintPropertyNode* currentEffectNode() const; |
94 | 98 |
95 // Scroll translation has special treatment in the transform and scroll trees. | 99 // Scroll translation has special treatment in the transform and scroll trees. |
96 void updateScrollAndScrollTranslationNodes(const TransformPaintPropertyNode*); | 100 void updateScrollAndScrollTranslationNodes(const TransformPaintPropertyNode*); |
97 | 101 |
98 // Property trees which should be updated by the manager. | 102 // Property trees which should be updated by the manager. |
99 cc::PropertyTrees& m_propertyTrees; | 103 cc::PropertyTrees& m_propertyTrees; |
100 | 104 |
101 // Layer to which transform "owner" layers should be added. These will not | 105 // Layer to which transform "owner" layers should be added. These will not |
102 // have any actual children, but at present must exist in the tree. | 106 // have any actual children, but at present must exist in the tree. |
(...skipping 13 matching lines...) Expand all Loading... |
116 Vector<BlinkEffectAndCcIdPair> m_effectStack; | 120 Vector<BlinkEffectAndCcIdPair> m_effectStack; |
117 | 121 |
118 #if DCHECK_IS_ON() | 122 #if DCHECK_IS_ON() |
119 HashSet<const EffectPaintPropertyNode*> m_effectNodesConverted; | 123 HashSet<const EffectPaintPropertyNode*> m_effectNodesConverted; |
120 #endif | 124 #endif |
121 }; | 125 }; |
122 | 126 |
123 } // namespace blink | 127 } // namespace blink |
124 | 128 |
125 #endif // PropertyTreeManager_h | 129 #endif // PropertyTreeManager_h |
OLD | NEW |