createTexture method

  1. @override
TextureHandle createTexture(
  1. RenderTargetSpec spec
)
override

A brand-new texture matching spec, with the single TextureHandle that will ever stand for it.

Implementation

@override
TextureHandle createTexture(RenderTargetSpec spec) {
  createdTextures.add(spec);
  return TextureHandle(
    backend: 'fake ${_serial++}',
    width: spec.width,
    height: spec.height,
    format: spec.format,
    sampleCount: spec.sampleCount,
    storageMode: spec.storageMode,
  );
}