updateFromLayout method
void
updateFromLayout({})
Test hook mirroring updateFromMetadata but with an explicit reflected layout, so the value-preservation logic can be exercised without a GPU shader (see withLayout).
Implementation
@visibleForTesting
void updateFromLayout({
required String blockName,
required int blockSizeBytes,
required Map<String, ({FmatType type, int offset, bool sourceColor})>
parameters,
Map<String, Object> defaults = const {},
Map<String, FmatHintKind?> samplers = const {},
}) {
final layout = {
for (final e in parameters.entries)
e.key: _ParamSlot(
e.value.type,
e.value.offset,
sourceColor: e.value.sourceColor,
),
};
_applyRefresh(blockName, blockSizeBytes, layout, defaults, samplers);
}