Add 'reason' argument to device lost callback

Breaking change, but it should only require small changes in any project
that relies on it, so just doing this instead of a two-stage deprecation.
Will require a manual roll into (at least) Chromium.

Bug: dawn:1080, chromium:1253721
Change-Id: I6699e0629c3b2fe63e7f9d5ba0a928f00316a588
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64520
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Kai Ninomiya
2021-09-28 11:52:17 +00:00
committed by Corentin Wallez
parent affb7a3ab9
commit 51791e0409
16 changed files with 67 additions and 39 deletions

View File

@@ -138,7 +138,8 @@ namespace dawn_wire { namespace client {
{
for (LinkNode<ObjectBase>* device = deviceList.head(); device != deviceList.end();
device = device->next()) {
static_cast<Device*>(device->value())->HandleDeviceLost("GPU connection lost");
static_cast<Device*>(device->value())
->HandleDeviceLost(WGPUDeviceLostReason_Undefined, "GPU connection lost");
}
}
for (auto& objectList : mObjects) {