Skip to content

Commit bd70be6

Browse files
brianosmanSkia Commit-Bot
authored andcommitted
Add much better SkTHashMap visualization to Skia.natvis
No-Try: true Change-Id: I48a1722778931175c2d828171c40cc5ee4a7677e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329162 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
1 parent d1b4d34 commit bd70be6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

platform_tools/debugging/vs/Skia.natvis

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,25 @@
119119
</Expand>
120120
</Type>
121121

122+
<!-- SkTHashMap -->
123+
<Type Name="SkTHashMap&lt;*,*,*&gt;">
124+
<DisplayString>{{size = {fTable.fCount}}}</DisplayString>
125+
<Expand>
126+
<CustomListItems>
127+
<Variable Name="iSlot" InitialValue="0"/>
128+
<Size>fTable.fCount</Size>
129+
<Loop>
130+
<If Condition="fTable.fSlots.fArray._Mypair._Myval2[iSlot].hash != 0">
131+
<Item Name="{fTable.fSlots.fArray._Mypair._Myval2[iSlot].val.key}">
132+
fTable.fSlots.fArray._Mypair._Myval2[iSlot].val.val
133+
</Item>
134+
</If>
135+
<Exec>iSlot++</Exec>
136+
</Loop>
137+
</CustomListItems>
138+
</Expand>
139+
</Type>
140+
122141
<!-- SkImageInfo -->
123142
<Type Name="SkImageInfo">
124143
<DisplayString>[{fDimensions.fWidth} x {fDimensions.fHeight}] {fColorInfo.fColorType,en} {fColorInfo.fAlphaType,en} {fColorInfo.fColorSpace,na}</DisplayString>

0 commit comments

Comments
 (0)