Don't use Preferences to get the vsync rate pref. (bug 1285625 part 4, r=mchang)
authorDavid Anderson <danderson@mozilla.com>
Tue, 19 Jul 2016 11:56:07 -0700
changeset 345773 22fd4e2060125ea41ce16176910441d2c4989316
parent 345772 3fdb8ca3e6ffbd310daf342eb8febb1c17938dd0
child 345774 1ebb6348564337c00d889bd858eedf3c922e68c0
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmchang
bugs1285625
milestone50.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
Don't use Preferences to get the vsync rate pref. (bug 1285625 part 4, r=mchang)
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2265,30 +2265,29 @@ gfxPlatform::CreateHardwareVsyncSource()
 /* static */ bool
 gfxPlatform::IsInLayoutAsapMode()
 {
   // There are 2 modes of ASAP mode.
   // 1 is that the refresh driver and compositor are in lock step
   // the second is that the compositor goes ASAP and the refresh driver
   // goes at whatever the configurated rate is. This only checks the version
   // talos uses, which is the refresh driver and compositor are in lockstep.
-  return Preferences::GetInt("layout.frame_rate", -1) == 0;
+  return gfxPrefs::LayoutFrameRate() == 0;
 }
 
 /* static */ bool
 gfxPlatform::ForceSoftwareVsync()
 {
-  return Preferences::GetInt("layout.frame_rate", -1) > 0;
+  return gfxPrefs::LayoutFrameRate() > 0;
 }
 
 /* static */ int
 gfxPlatform::GetSoftwareVsyncRate()
 {
-  int preferenceRate = Preferences::GetInt("layout.frame_rate",
-                                           gfxPlatform::GetDefaultFrameRate());
+  int preferenceRate = gfxPrefs::LayoutFrameRate();
   if (preferenceRate <= 0) {
     return gfxPlatform::GetDefaultFrameRate();
   }
   return preferenceRate;
 }
 
 /* static */ int
 gfxPlatform::GetDefaultFrameRate()