CapturedResource class Debugging and profiling

One resource observed during the capture frame: a texture written by a pass (under a blackboard key or a transient debug name), or a non-texture blackboard entry (packed uniform data).

Constructors

CapturedResource({required String key, required int passIndex, String? debugName, int width = 0, int height = 0, PixelFormat? format, int sampleCount = 1, StorageMode? storageMode, bool isTexture = true, int? byteLength, Texture? snapshot, Texture? thumbnail, bool snapshotFailed = false, Uint8List? thumbnailPng})
CapturedResource.fromJson(Map<String, Object?> json)
Rebuilds a resource from toJson output. Textures are not restored; a serialized thumbnail comes back as thumbnailPng.
factory

Properties

byteLength → int?
For ByteData blackboard entries, the packed length.
final
debugName → String?
The transient descriptor's debug name, when pool-allocated.
final
format → PixelFormat?
final
hashCode → int
The hash code for this object.
no setterinherited
height → int
final
isTexture → bool
False for non-texture blackboard entries (see byteLength).
final
key → String
The blackboard key or internal:<debugName> for unpublished targets.
final
passIndex → int
Index of the pass that wrote this content, or -1 for textures acquired while the graph was being built.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleCount → int
final
shaderReadable → bool
Whether this resource cannot carry image content (transient tile memory or non-shader-readable).
no setter
snapshot ↔ Texture?
Full-resolution copy in the source format, when requested and shader-readable.
getter/setter pair
snapshotFailed ↔ bool
Whether an attempted copy failed (an unreadable or unrenderable format); metadata is still valid.
getter/setter pair
storageMode → StorageMode?
The texture's storage mode (null only for non-texture entries).
final
thumbnail ↔ Texture?
Reduced copy in the source format, when requested.
getter/setter pair
thumbnailPng ↔ Uint8List?
The thumbnail as PNG bytes, set when a capture was serialized with images or loaded from one.
getter/setter pair
width → int
final

Methods

encodeThumbnailPng() → Future<bool>
Reads thumbnail back as PNG into thumbnailPng. False when there is no thumbnail or the readback failed (a format the display path cannot present).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson({bool includePng = true}) → Map<String, Object?>
Metadata, plus the thumbnail as base64 PNG when includePng and one is held (see encodeThumbnailPng).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited