Bug 888781 part 1 - Use cached default scale in GetDefaultScaleInternal of Windows. r=jimm
authorXidorn Quan <me@upsuper.org>
Mon, 19 Sep 2016 10:35:12 +1000
changeset 314490 b4a82f0cb935511ecb6ea1ff51b4a733db77d5fa
parent 314489 150e2a3f3b1e3320eee926ae33f548689de7fa07
child 314491 ff28b15107631c762ed5db714c8310260343bd27
push id81903
push usercbook@mozilla.com
push dateTue, 20 Sep 2016 10:04:26 +0000
treeherdermozilla-inbound@150109898e5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs888781
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 888781 part 1 - Use cached default scale in GetDefaultScaleInternal of Windows. r=jimm MozReview-Commit-ID: Ebm7h3h2mrg
widget/windows/nsWindow.cpp
--- 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);
 }