hasHardwareWebGpu function

bool hasHardwareWebGpu(
  1. TaskPlatform platform
)

Whether platform names a hardware WebGPU adapter, the only one Google's browser Decision Maker answers on and its Universal Embedder runs on.

Implementation

bool hasHardwareWebGpu(TaskPlatform platform) => switch (platform.gpu) {
  final gpu? =>
    gpu.startsWith(webGpuAdapterPrefix) && !_softwareAdapter.hasMatch(gpu),
  null => false,
};