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 DisplayItemPropertyTreeBuilder_h | 5 #ifndef DisplayItemPropertyTreeBuilder_h |
6 #define DisplayItemPropertyTreeBuilder_h | 6 #define DisplayItemPropertyTreeBuilder_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "platform/geometry/FloatSize.h" | 9 #include "platform/geometry/FloatSize.h" |
| 10 #include "platform/graphics/paint/DisplayItemClient.h" |
| 11 #include "wtf/HashMap.h" |
10 #include "wtf/OwnPtr.h" | 12 #include "wtf/OwnPtr.h" |
11 #include "wtf/PassOwnPtr.h" | 13 #include "wtf/PassOwnPtr.h" |
12 #include "wtf/Vector.h" | 14 #include "wtf/Vector.h" |
13 | 15 |
14 namespace blink { | 16 namespace blink { |
15 | 17 |
16 class DisplayItem; | 18 class DisplayItem; |
17 class DisplayItemClipTree; | 19 class DisplayItemClipTree; |
18 class DisplayItemTransformTree; | 20 class DisplayItemTransformTree; |
19 | 21 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 90 |
89 // Used to manipulate the current transform node stack. | 91 // Used to manipulate the current transform node stack. |
90 BuilderState& currentState() { return m_stateStack.last(); } | 92 BuilderState& currentState() { return m_stateStack.last(); } |
91 | 93 |
92 // Handle a begin display item. | 94 // Handle a begin display item. |
93 void processBeginItem(const DisplayItem&); | 95 void processBeginItem(const DisplayItem&); |
94 | 96 |
95 // Handle an end display item. | 97 // Handle an end display item. |
96 void processEndItem(const DisplayItem&); | 98 void processEndItem(const DisplayItem&); |
97 | 99 |
| 100 void processAnchorItem(const DisplayItem&); |
| 101 |
98 // Emit a range record, unless it would be empty. | 102 // Emit a range record, unless it would be empty. |
99 void finishRange(); | 103 void finishRange(); |
100 | 104 |
101 OwnPtr<DisplayItemTransformTree> m_transformTree; | 105 OwnPtr<DisplayItemTransformTree> m_transformTree; |
102 OwnPtr<DisplayItemClipTree> m_clipTree; | 106 OwnPtr<DisplayItemClipTree> m_clipTree; |
103 Vector<RangeRecord> m_rangeRecords; | 107 Vector<RangeRecord> m_rangeRecords; |
104 // TODO(jbroman): Experimentally select a less arbitrary inline capacity. | 108 // TODO(jbroman): Experimentally select a less arbitrary inline capacity. |
105 Vector<BuilderState, 40> m_stateStack; | 109 Vector<BuilderState, 40> m_stateStack; |
| 110 HashMap<DisplayItemClient, BuilderState> m_anchors; |
106 size_t m_rangeBeginIndex; | 111 size_t m_rangeBeginIndex; |
107 size_t m_currentIndex; | 112 size_t m_currentIndex; |
108 }; | 113 }; |
109 | 114 |
110 } // namespace blink | 115 } // namespace blink |
111 | 116 |
112 #endif // DisplayItemPropertyTreeBuilder_h | 117 #endif // DisplayItemPropertyTreeBuilder_h |
OLD | NEW |