createStorageBuffer method

  1. @override
StorageBuffer createStorageBuffer(
  1. ByteData bytes, {
  2. bool hostReadable = false,
})
override

A storage buffer holding bytes. hostReadable allows readBuffer.

Implementation

@override
StorageBuffer createStorageBuffer(
  ByteData bytes, {
  bool hostReadable = false,
}) {
  final buffer = inner.createStorageBuffer(bytes, hostReadable: hostReadable);
  events.add(
    TraceCreateStorageBuffer(
      id: _name(_storageIds, buffer),
      bytes: _copy(bytes),
      hostReadable: hostReadable,
    ),
  );
  return buffer;
}