Bug 1572633 - Remove apz.overscroll.spring_{stiffness,friction}. r=botond
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 16 Aug 2019 07:28:08 +0000
changeset 488442 f9534a732e48d4b292da4dee06dbeff6586c698e
parent 488441 c9ece2f3ad559ed5a861b8b7c829bb6277c12fe7
child 488443 ab84d8979801b3ba477f9cc530c63917fafffeaa
push id36444
push userccoroiu@mozilla.com
push dateFri, 16 Aug 2019 16:24:18 +0000
treeherdermozilla-central@8a9e9189cd98 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1572633
milestone70.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 1572633 - Remove apz.overscroll.spring_{stiffness,friction}. r=botond They are unused. Differential Revision: https://phabricator.services.mozilla.com/D41330
gfx/layers/apz/src/AsyncPanZoomController.cpp
gfx/layers/apz/test/gtest/TestBasic.cpp
modules/libpref/init/StaticPrefList.yaml
modules/libpref/init/all.js
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -376,28 +376,16 @@ typedef PlatformSpecificStateBase
  * during panning.
  *
  * \li\b apz.overscroll.stretch_factor
  * How much overscrolling can stretch content along an axis.
  * The maximum stretch along an axis is a factor of (1 + kStretchFactor).
  * (So if kStretchFactor is 0, you can't stretch at all; if kStretchFactor
  * is 1, you can stretch at most by a factor of 2).
  *
- * \li\b apz.overscroll.spring_stiffness
- * The stiffness of the spring used in the physics model for the overscroll
- * animation.
- *
- * \li\b apz.overscroll.spring_friction
- * The friction of the spring used in the physics model for the overscroll
- * animation.
- * Even though a realistic physics model would dictate that this be the same
- * as \b apz.fling_friction, we allow it to be set to be something different,
- * because in practice we want flings to skate smoothly (low friction), while
- * we want the overscroll bounce-back to oscillate few times (high friction).
- *
  * \li\b apz.overscroll.stop_distance_threshold
  * \li\b apz.overscroll.stop_velocity_threshold
  * Thresholds for stopping the overscroll animation. When both the distance
  * and the velocity fall below their thresholds, we stop oscillating.\n
  * Units: screen pixels (for distance)
  *        screen pixels per millisecond (for velocity)
  *
  * \li\b apz.paint_skipping.enabled
--- a/gfx/layers/apz/test/gtest/TestBasic.cpp
+++ b/gfx/layers/apz/test/gtest/TestBasic.cpp
@@ -307,21 +307,16 @@ TEST_F(APZCBasicTester, OverScroll_Bug11
   // Doctor the prefs to make the velocity zero at the end of the first sample.
 
   // This ensures our incoming velocity to the overscroll animation is
   // a round(ish) number, 4.9 (that being the distance of the pan before
   // overscroll, which is 500 - 10 = 490 pixels, divided by the duration of
   // the pan, which is 100 ms).
   SCOPED_GFX_PREF_FLOAT("apz.fling_friction", 0);
 
-  // To ensure the velocity after the first sample is 0, set the spring
-  // stiffness to the incoming velocity (4.9) divided by the overscroll
-  // (400 pixels) times the step duration (1 ms).
-  SCOPED_GFX_PREF_FLOAT("apz.overscroll.spring_stiffness", 0.01225f);
-
   TestOverscroll();
 }
 
 // Tests that ending an overscroll animation doesn't leave around state that
 // confuses the next overscroll animation.
 TEST_F(APZCBasicTester, OverScroll_Bug1152051b) {
   SCOPED_GFX_PREF_BOOL("apz.overscroll.enabled", true);
   SCOPED_GFX_PREF_FLOAT("apz.overscroll.stop_distance_threshold", 0.1f);
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -437,21 +437,16 @@
   value: false
   mirror: always
 
 - name: apz.overscroll.min_pan_distance_ratio
   type: AtomicFloat
   value: 1.0f
   mirror: always
 
-- name: apz.overscroll.spring_stiffness
-  type: AtomicFloat
-  value: 0.001f
-  mirror: always
-
 - name: apz.overscroll.stop_distance_threshold
   type: AtomicFloat
   value: 5.0f
   mirror: always
 
 - name: apz.paint_skipping.enabled
   type: RelaxedAtomicBool
   value: true
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -735,18 +735,16 @@ pref("apz.frame_delay.enabled", true);
 #endif
 pref("apz.max_tap_time", 300);
 pref("apz.max_velocity_inches_per_ms", "-1.0");
 pref("apz.min_skate_speed", "1.0");
 pref("apz.minimap.enabled", false);
 pref("apz.one_touch_pinch.enabled", true);
 pref("apz.overscroll.enabled", false);
 pref("apz.overscroll.min_pan_distance_ratio", "1.0");
-pref("apz.overscroll.spring_friction", "0.015");
-pref("apz.overscroll.spring_stiffness", "0.0018");
 pref("apz.overscroll.stop_distance_threshold", "5.0");
 pref("apz.overscroll.stop_velocity_threshold", "0.01");
 pref("apz.overscroll.stretch_factor", "0.35");
 pref("apz.paint_skipping.enabled", true);
 // Fetch displayport updates early from the message queue
 pref("apz.peek_messages.enabled", true);
 pref("apz.pinch_lock.mode", 1);
 pref("apz.pinch_lock.scoll_lock_threshold", "0.03125");  // 1/32 inches