Bug 1879425 - Log GPU device reset to gfx Failure Log of about:support r=gfx-reviewers,lsalzman

Unify how to log device reset. It helps for debugging.

Differential Revision: https://phabricator.services.mozilla.com/D209926
This commit is contained in:
sotaro
2024-05-14 00:46:12 +00:00
parent 298bc0f634
commit 1e986b7842
25 changed files with 268 additions and 142 deletions

View File

@@ -234,11 +234,13 @@ bool GPUParent::Init(mozilla::ipc::UntypedEndpoint&& aEndpoint,
return true;
}
void GPUParent::NotifyDeviceReset() {
void GPUParent::NotifyDeviceReset(DeviceResetReason aReason,
DeviceResetDetectPlace aPlace) {
if (!NS_IsMainThread()) {
NS_DispatchToMainThread(NS_NewRunnableFunction(
"gfx::GPUParent::NotifyDeviceReset",
[]() -> void { GPUParent::GetSingleton()->NotifyDeviceReset(); }));
"gfx::GPUParent::NotifyDeviceReset", [aReason, aPlace]() -> void {
GPUParent::GetSingleton()->NotifyDeviceReset(aReason, aPlace);
}));
return;
}
@@ -255,7 +257,7 @@ void GPUParent::NotifyDeviceReset() {
// and that they should reset their compositors and repaint
GPUDeviceData data;
RecvGetDeviceStatus(&data);
Unused << SendNotifyDeviceReset(data);
Unused << SendNotifyDeviceReset(data, aReason, aPlace);
}
void GPUParent::NotifyOverlayInfo(layers::OverlayInfo aInfo) {