mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1923799 - For opaque windows, don't bother clearing the nc-area on resize. r=win-reviewers,rkraesig
Differential Revision: https://phabricator.services.mozilla.com/D225339
This commit is contained in:
parent
b40948fe6e
commit
114d7ff344
@ -209,19 +209,19 @@ bool nsWindow::OnPaint(uint32_t aNestingLevel) {
|
||||
translucentRegion.SubOut(mOpaqueRegion);
|
||||
region.OrWith(translucentRegion);
|
||||
}
|
||||
}
|
||||
|
||||
if (!usingMemoryDC && (mNeedsNCAreaClear || didResize)) {
|
||||
// We need to clear the non-client-area region, and the transparent parts
|
||||
// of the window to black (once).
|
||||
auto black = reinterpret_cast<HBRUSH>(::GetStockObject(BLACK_BRUSH));
|
||||
nsAutoRegion regionToClear(ComputeNonClientHRGN());
|
||||
if (mTransparencyMode == TransparencyMode::Transparent &&
|
||||
!translucentRegion.IsEmpty()) {
|
||||
nsAutoRegion translucent(WinUtils::RegionToHRGN(translucentRegion));
|
||||
::CombineRgn(regionToClear, regionToClear, translucent, RGN_OR);
|
||||
if (mNeedsNCAreaClear ||
|
||||
(didResize && mTransparencyMode == TransparencyMode::Transparent)) {
|
||||
// We need to clear the non-client-area region, and the transparent parts
|
||||
// of the window to black (once).
|
||||
auto black = reinterpret_cast<HBRUSH>(::GetStockObject(BLACK_BRUSH));
|
||||
nsAutoRegion regionToClear(ComputeNonClientHRGN());
|
||||
if (!translucentRegion.IsEmpty()) {
|
||||
nsAutoRegion translucent(WinUtils::RegionToHRGN(translucentRegion));
|
||||
::CombineRgn(regionToClear, regionToClear, translucent, RGN_OR);
|
||||
}
|
||||
::FillRgn(hDC, regionToClear, black);
|
||||
}
|
||||
::FillRgn(hDC, regionToClear, black);
|
||||
}
|
||||
mNeedsNCAreaClear = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user