Revert "[dawn][native] Some cleanup of DeviceLostEvent code." This reverts commit a2bc4fa3d9a37ff02bef22ab81a42d7cd7c34bc2. Reason for revert: Potentially causing memory leak in Dawn->Chrome roll. Original change's description: > [dawn][native] Some cleanup of DeviceLostEvent code. > > - Uses the refcount payload in RefCountedWithExternalCount to track > whether an external ref count exists. Note that we are using a > "ForTesting" function to implement the check of the count even > though this is not for testing. We are special casing this because > it is a valid check for the external ref count. This is needed to > explicitly handle the spec behavior that the device lost event > should pass nullptr for the device when the last external > reference has been dropped. > - Makes APIGetLostFuture use cached future id when possible. > - Moves the device lost related members in Device to private since > the mock isn't actually using the alternative constructor anymore. > Also removes said constructor. > - Finally, defer cleanup of the callback infos to the completion of > the device lost callback instead of having it called in two > different places, the callback and in > DeviceBase::WillDropLastExternalRef. > > Change-Id: I31b57391438c0782ba223884a72991ca77426bec > Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/299539 > Commit-Queue: Loko Kung <lokokung@google.com> > Reviewed-by: Kai Ninomiya <kainino@chromium.org> # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I4b42d4042c8f847baf193c20aa74c2356fde6841 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/300955 Commit-Queue: Loko Kung <lokokung@google.com> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Loko Kung <lokokung@google.com> Reviewed-by: David Neto <dneto@google.com> Commit-Queue: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.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.