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

@@ -59,9 +59,12 @@ namespace dawn_wire { namespace server {
SerializeCommand(cmd);
}
void Server::OnDeviceLost(ObjectHandle device, const char* message) {
void Server::OnDeviceLost(ObjectHandle device,
WGPUDeviceLostReason reason,
const char* message) {
ReturnDeviceLostCallbackCmd cmd;
cmd.device = device;
cmd.reason = reason;
cmd.message = message;
SerializeCommand(cmd);