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>
This commit is contained in:
Brian Osman 2020-10-22 10:00:28 -04:00 committed by Skia Commit-Bot
parent d1b4d34e99
commit bd70be614f

View File

@ -119,6 +119,25 @@
</Expand>
</Type>
<!-- SkTHashMap -->
<Type Name="SkTHashMap&lt;*,*,*&gt;">
<DisplayString>{{size = {fTable.fCount}}}</DisplayString>
<Expand>
<CustomListItems>
<Variable Name="iSlot" InitialValue="0"/>
<Size>fTable.fCount</Size>
<Loop>
<If Condition="fTable.fSlots.fArray._Mypair._Myval2[iSlot].hash != 0">
<Item Name="{fTable.fSlots.fArray._Mypair._Myval2[iSlot].val.key}">
fTable.fSlots.fArray._Mypair._Myval2[iSlot].val.val
</Item>
</If>
<Exec>iSlot++</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>
<!-- SkImageInfo -->
<Type Name="SkImageInfo">
<DisplayString>[{fDimensions.fWidth} x {fDimensions.fHeight}] {fColorInfo.fColorType,en} {fColorInfo.fAlphaType,en} {fColorInfo.fColorSpace,na}</DisplayString>