Bug 1461946 - Remove unused function and parameter. r=mattwoodrow
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 16 May 2018 08:32:18 -0400
changeset 796257 235653928b6570fd2212a93cd1a5c0d90f8c3def
parent 796256 ed9f0ddabe14ac91b60da3588a57619ff550113e
child 796258 21c7092d6d78f51199b766ca6780d4d03d95abec
push id110198
push userbmo:rcaliman@mozilla.com
push dateThu, 17 May 2018 12:04:52 +0000
reviewersmattwoodrow
bugs1461946
milestone62.0a1
Bug 1461946 - Remove unused function and parameter. r=mattwoodrow MozReview-Commit-ID: CJ9ObpuRJCD
layout/base/nsRefreshDriver.cpp
layout/base/nsRefreshDriver.h
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -1067,31 +1067,22 @@ nsRefreshDriver::DefaultInterval()
 // outIsDefault indicates that rate was not explicitly set by the user
 // so we might choose other, more appropriate rates (e.g. vsync, etc)
 // layout.frame_rate=0 indicates "ASAP mode".
 // In ASAP mode rendering is iterated as fast as possible (typically for stress testing).
 // A target rate of 10k is used internally instead of special-handling 0.
 // Backends which block on swap/present/etc should try to not block
 // when layout.frame_rate=0 - to comply with "ASAP" as much as possible.
 double
-nsRefreshDriver::GetRegularTimerInterval(bool *outIsDefault) const
+nsRefreshDriver::GetRegularTimerInterval() const
 {
   int32_t rate = Preferences::GetInt("layout.frame_rate", -1);
   if (rate < 0) {
     rate = gfxPlatform::GetDefaultFrameRate();
-    if (outIsDefault) {
-      *outIsDefault = true;
-    }
-  } else {
-    if (outIsDefault) {
-      *outIsDefault = false;
-    }
-  }
-
-  if (rate == 0) {
+  } else if (rate == 0) {
     rate = 10000;
   }
 
   return 1000.0 / rate;
 }
 
 /* static */ double
 nsRefreshDriver::GetThrottledTimerInterval()
@@ -1109,35 +1100,28 @@ nsRefreshDriver::GetMinRecomputeVisibili
   int32_t interval =
     Preferences::GetInt("layout.visibility.min-recompute-interval-ms", -1);
   if (interval <= 0) {
     interval = DEFAULT_RECOMPUTE_VISIBILITY_INTERVAL_MS;
   }
   return TimeDuration::FromMilliseconds(interval);
 }
 
-double
-nsRefreshDriver::GetRefreshTimerInterval() const
-{
-  return mThrottled ? GetThrottledTimerInterval() : GetRegularTimerInterval();
-}
-
 RefreshDriverTimer*
 nsRefreshDriver::ChooseTimer() const
 {
   if (mThrottled) {
     if (!sThrottledRateTimer)
       sThrottledRateTimer = new InactiveRefreshDriverTimer(GetThrottledTimerInterval(),
                                                            DEFAULT_INACTIVE_TIMER_DISABLE_SECONDS * 1000.0);
     return sThrottledRateTimer;
   }
 
   if (!sRegularRateTimer) {
-    bool isDefault = true;
-    double rate = GetRegularTimerInterval(&isDefault);
+    double rate = GetRegularTimerInterval();
 
     // Try to use vsync-base refresh timer first for sRegularRateTimer.
     CreateVsyncRefreshTimer();
 
     if (!sRegularRateTimer) {
       sRegularRateTimer = new StartupRefreshDriverTimer(rate);
     }
   }
--- a/layout/base/nsRefreshDriver.h
+++ b/layout/base/nsRefreshDriver.h
@@ -431,18 +431,17 @@ private:
 
   bool HasObservers() const;
   uint32_t ObserverCount() const;
   bool HasImageRequests() const;
   ObserverArray& ArrayFor(mozilla::FlushType aFlushType);
   // Trigger a refresh immediately, if haven't been disconnected or frozen.
   void DoRefresh();
 
-  double GetRefreshTimerInterval() const;
-  double GetRegularTimerInterval(bool *outIsDefault = nullptr) const;
+  double GetRegularTimerInterval() const;
   static double GetThrottledTimerInterval();
 
   static mozilla::TimeDuration GetMinRecomputeVisibilityInterval();
 
   bool HaveFrameRequestCallbacks() const {
     return mFrameRequestCallbackDocs.Length() != 0;
   }