Bug 1177842 - Introduce separate friction for fling-snap. r=botond

--HG--
extra : rebase_source : 1ce9d27b5208622a9ba14be4b684116adbc6c453
This commit is contained in:
Chris Lord 2015-10-26 18:04:02 +00:00
Родитель c43ad45f05
Коммит e31fb8cd6d
4 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -1025,6 +1025,7 @@ pref("apz.fling_curve_function_x2", "0.80");
pref("apz.fling_curve_function_y2", "1.0");
pref("apz.fling_curve_threshold_inches_per_ms", "0.01");
pref("apz.fling_friction", "0.0019");
pref("apz.fling_snap_friction", "0.015");
pref("apz.max_velocity_inches_per_ms", "0.07");
pref("apz.touch_start_tolerance", "0.1");

Просмотреть файл

@ -2331,7 +2331,7 @@ void AsyncPanZoomController::AcceptFling(ParentLayerPoint& aVelocity,
aOverscrollHandoffChain,
!aHandoff); // only apply acceleration if this is an initial fling
float friction = gfxPrefs::APZFlingFriction();
float friction = gfxPrefs::APZFlingSnapFriction();
ParentLayerPoint velocity(mX.GetVelocity(), mY.GetVelocity());
ParentLayerPoint predictedDelta;
// "-velocity / log(1.0 - friction)" is the integral of the deceleration

Просмотреть файл

@ -162,6 +162,7 @@ private:
DECL_GFX_PREF(Live, "apz.fling_curve_threshold_inches_per_ms", APZCurveThreshold, float, -1.0f);
DECL_GFX_PREF(Once, "apz.fling_friction", APZFlingFriction, float, 0.002f);
DECL_GFX_PREF(Live, "apz.fling_repaint_interval", APZFlingRepaintInterval, int32_t, 75);
DECL_GFX_PREF(Once, "apz.fling_snap_friction", APZFlingSnapFriction, float, 0.015f);
DECL_GFX_PREF(Once, "apz.fling_stop_on_tap_threshold", APZFlingStopOnTapThreshold, float, 0.05f);
DECL_GFX_PREF(Once, "apz.fling_stopped_threshold", APZFlingStoppedThreshold, float, 0.01f);
DECL_GFX_PREF(Once, "apz.highlight_checkerboarded_areas", APZHighlightCheckerboardedAreas, bool, false);

Просмотреть файл

@ -561,6 +561,7 @@ pref("apz.fling_curve_function_x2", "1.0");
pref("apz.fling_curve_function_y2", "1.0");
pref("apz.fling_curve_threshold_inches_per_ms", "-1.0");
pref("apz.fling_friction", "0.002");
pref("apz.fling_snap_friction", "0.015");
pref("apz.fling_stop_on_tap_threshold", "0.05");
pref("apz.fling_stopped_threshold", "0.01");
pref("apz.highlight_checkerboarded_areas", false);