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 314423 b4a82f0cb935511ecb6ea1ff51b4a733db77d5fa
parent 314422 150e2a3f3b1e3320eee926ae33f548689de7fa07
child 314424 ff28b15107631c762ed5db714c8310260343bd27
push id20574
push usercbook@mozilla.com
push dateTue, 20 Sep 2016 10:05:16 +0000
treeherderfx-team@14705f779a46 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs888781
milestone52.0a1
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);
 }