Bug 888781 part 1 - Use cached default scale in GetDefaultScaleInternal of Windows. r?jimm
MozReview-Commit-ID: Ebm7h3h2mrg
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -1091,17 +1091,17 @@ float nsWindow::GetDPI()
return float(heightPx/heightInches);
}
double nsWindow::GetDefaultScaleInternal()
{
if (mDefaultScale <= 0.0) {
mDefaultScale = WinUtils::LogToPhysFactor(mWnd);
}
- return WinUtils::LogToPhysFactor(mWnd);
+ return mDefaultScale;
}
int32_t nsWindow::LogToPhys(double aValue)
{
return WinUtils::LogToPhys(::MonitorFromWindow(mWnd,
MONITOR_DEFAULTTOPRIMARY),
aValue);
}