Bug 1454908 - do an empty paint when skipping the actual paint for the blank window, to stop Windows from sending messages repeatedly, r=jimm.

This commit is contained in:
Florian Quèze 2018-04-18 21:17:46 +02:00
Родитель ee8a623de2
Коммит 0bf69fee2b
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -221,8 +221,13 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
return true;
}
PAINTSTRUCT ps;
// Avoid starting the GPU process for the initial navigator:blank window.
if (mIsEarlyBlankWindow) {
// Call BeginPaint/EndPaint or Windows will keep sending us messages.
::BeginPaint(mWnd, &ps);
::EndPaint(mWnd, &ps);
return true;
}
@ -233,8 +238,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
}
mLastPaintBounds = mBounds;
PAINTSTRUCT ps;
#ifdef MOZ_XUL
if (!aDC && (eTransparencyTransparent == mTransparencyMode))
{