Skip to content

Commit

Permalink
Bug 1851991: Do not try to raise the GPU process priority when it has…
Browse files Browse the repository at this point in the history
…n't been initialized yet. r=jrmuizel, a=dmeehan

Differential Revision: https://phabricator.services.mozilla.com/D188275
  • Loading branch information
Bas-moz committed Sep 14, 2023
1 parent 4155a83 commit 52df880
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion widget/windows/nsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6234,7 +6234,13 @@ bool nsWindow::ProcessMessageInternal(UINT msg, WPARAM& wParam, LPARAM& lParam,
} break;

case WM_ACTIVATEAPP: {
GPUProcessManager::Get()->SetAppInForeground(wParam);
// Bug 1851991: Sometimes this can be called before gfxPlatform::Init
// when a window is created very early. In that case we just forego
// setting this and accept the GPU process might briefly run at a lower
// priority.
if (GPUProcessManager::Get()) {
GPUProcessManager::Get()->SetAppInForeground(wParam);
}
} break;

case WM_MOUSEACTIVATE:
Expand Down

0 comments on commit 52df880

Please sign in to comment.