mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1295742 - Add gfxCriticalNote for driver reset. r=jerry, r=dvander
This commit is contained in:
parent
1b607c3e60
commit
d2db92ebce
@ -976,12 +976,14 @@ gfxWindowsPlatform::SchedulePaintIfDeviceReset()
|
||||
return;
|
||||
}
|
||||
|
||||
gfxCriticalNote << "(gfxWindowsPlatform) Detected device reset: " << (int)resetReason;
|
||||
|
||||
// Trigger an ::OnPaint for each window.
|
||||
::EnumThreadWindows(GetCurrentThreadId(),
|
||||
InvalidateWindowForDeviceReset,
|
||||
0);
|
||||
|
||||
gfxCriticalNote << "Detected rendering device reset on refresh: " << (int)resetReason;
|
||||
gfxCriticalNote << "(gfxWindowsPlatform) Finished device reset.";
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -170,11 +170,18 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
|
||||
if (mozilla::ipc::MessageChannel::IsSpinLoopActive() && mPainting)
|
||||
return false;
|
||||
|
||||
if (gfxWindowsPlatform::GetPlatform()->DidRenderingDeviceReset()) {
|
||||
DeviceResetReason resetReason = DeviceResetReason::OK;
|
||||
if (gfxWindowsPlatform::GetPlatform()->DidRenderingDeviceReset(&resetReason)) {
|
||||
|
||||
gfxCriticalNote << "(nsWindow) Detected device reset: " << (int)resetReason;
|
||||
|
||||
gfxWindowsPlatform::GetPlatform()->UpdateRenderMode();
|
||||
EnumAllWindows([] (nsWindow* aWindow) -> void {
|
||||
aWindow->OnRenderingDeviceReset();
|
||||
});
|
||||
|
||||
gfxCriticalNote << "(nsWindow) Finished device reset.";
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user