[android][webgpu] Fix thread safety and resource leaks in WebGpu helper. Migrates the WebGpu helper and associated instrumentation tests to run sequentially on a dedicated single-threaded CoroutineDispatcher. - Prevents thread leaks by closing the dispatcher service upon close() if owned by the instance. - Prevents reentrancy deadlocks during teardown by using a ThreadLocal to run cleanup inline when already on the WebGPU thread. - Updates all tests to run within the dispatcher's execution context and clean up dispatchers on teardown. Bug: 490019860 Change-Id: I716ce0e616105c65a8dce7d489c62d9b3156df69 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/311456 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Tarun Saini <sainitarun@google.com> Reviewed-by: Mridul Goyal <mridulgoyal@google.com>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.