GPUCanvasConfiguration constructor

GPUCanvasConfiguration({
  1. required GPUDevice device,
  2. required GPUTextureFormat format,
  3. int? usage,
  4. Iterable<GPUTextureFormat>? viewFormats,
  5. PredefinedColorSpace? colorSpace,
  6. GPUCanvasAlphaMode? alphaMode,
})

Implementation

factory GPUCanvasConfiguration(
        {required GPUDevice device,
        required GPUTextureFormat format,
        int? usage,
        Iterable<GPUTextureFormat>? viewFormats,
        PredefinedColorSpace? colorSpace,
        GPUCanvasAlphaMode? alphaMode}) =>
    GPUCanvasConfiguration._(
        device: device,
        format: format.value,
        usage: usage ?? 0x10,
        viewFormats: viewFormats?.map((e) => e.value) ?? const [],
        colorSpace: colorSpace?.value ?? PredefinedColorSpace.srgb.value,
        alphaMode: alphaMode?.value ?? GPUCanvasAlphaMode.opaque.value);