GPUCanvasConfiguration constructor

GPUCanvasConfiguration({
  1. GPUDevice device,
  2. String format,
  3. int usage,
  4. String alphaMode,
})

format should be GPU.getPreferredCanvasFormat's answer, usage a bitwise or of GpuTextureUsage values — COPY_DST and not RENDER_ATTACHMENT where presenting is a copy — and alphaMode is "opaque" or "premultiplied".

Implementation

external factory GPUCanvasConfiguration({
  GPUDevice device,
  String format,
  int usage,
  String alphaMode,
});