Bug 1295742 - Add gfxCriticalNote for driver reset. r=jerry, r=dvander

This commit is contained in:
Ethan Lin 2016-08-25 02:17:00 -04:00
Родитель 1b607c3e60
Коммит d2db92ebce
2 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -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;
}