toJson method
Implementation
@override
Map<String, Object?> toJson(TraceBlobWriter blob) => <String, Object?>{
'pass': pass,
'label': label,
'colors': <Object?>[
for (final c in colors)
<String, Object?>{
'texture': c.texture,
'resolveTexture': c.resolveTexture,
'loadAction': c.loadAction.name,
'storeAction': c.storeAction.name,
'clearValue': c.clearValue == null
? null
: vector4ToJson(c.clearValue!),
'face': c.face,
'mipLevel': c.mipLevel,
},
],
'depth': switch (depth) {
null => null,
final d => <String, Object?>{
'texture': d.texture,
'clearValue': d.clearValue,
'loadAction': d.loadAction.name,
'storeAction': d.storeAction.name,
'stencilLoadAction': d.stencilLoadAction.name,
'stencilStoreAction': d.stencilStoreAction.name,
'stencilClearValue': d.stencilClearValue,
},
},
};