diff --git a/browser/metro/profile/metro.js b/browser/metro/profile/metro.js index a66360a8343a..eb0edc131509 100644 --- a/browser/metro/profile/metro.js +++ b/browser/metro/profile/metro.js @@ -36,15 +36,17 @@ pref("prompts.tab_modal.enabled", true); pref("layers.offmainthreadcomposition.enabled", true); pref("layers.async-pan-zoom.enabled", true); pref("layers.componentalpha.enabled", false); -pref("gfx.azpc.touch_start_tolerance", "0.1"); // dpi * tolerance = pixel threshold -pref("gfx.azpc.pan_repaint_interval", "50"); // prefer 20 fps -pref("gfx.azpc.fling_repaint_interval", "50"); // prefer 20 fps -pref("gfx.axis.fling_friction", "0.002"); -pref("gfx.axis.fling_stopped_threshold", "0.2"); + +// Prefs to control the async pan/zoom behaviour +pref("apz.touch_start_tolerance", "0.1"); // dpi * tolerance = pixel threshold +pref("apz.pan_repaint_interval", "50"); // prefer 20 fps +pref("apz.fling_repaint_interval", "50"); // prefer 20 fps +pref("apz.fling_friction", "0.002"); +pref("apz.fling_stopped_threshold", "0.2"); // 0 = free, 1 = standard, 2 = sticky -pref("apzc.axis_lock_mode", 2); -pref("apzc.cross_slide.enabled", true); +pref("apz.axis_lock_mode", 2); +pref("apz.cross_slide.enabled", true); // Enable Microsoft TSF support by default for imes. pref("intl.enable_tsf_support", true); diff --git a/gfx/layers/ipc/AsyncPanZoomController.cpp b/gfx/layers/ipc/AsyncPanZoomController.cpp index 087b4b3daefa..67ce0ce4705f 100644 --- a/gfx/layers/ipc/AsyncPanZoomController.cpp +++ b/gfx/layers/ipc/AsyncPanZoomController.cpp @@ -173,14 +173,14 @@ static float gYStationarySizeMultiplier = 2.5f; /** * The time period in ms that throttles mozbrowserasyncscroll event. - * Default is 100ms if there is no "apzc.asyncscroll.throttle" in preference. + * Default is 100ms if there is no "apz.asyncscroll.throttle" in preference. */ static int gAsyncScrollThrottleTime = 100; /** * The timeout in ms for mAsyncScrollTimeoutTask delay task. - * Default is 300ms if there is no "apzc.asyncscroll.timeout" in preference. + * Default is 300ms if there is no "apz.asyncscroll.timeout" in preference. */ static int gAsyncScrollTimeout = 300; @@ -236,21 +236,21 @@ AsyncPanZoomController::InitializeGlobalState() return; sInitialized = true; - Preferences::AddIntVarCache(&gPanRepaintInterval, "gfx.azpc.pan_repaint_interval", gPanRepaintInterval); - Preferences::AddIntVarCache(&gFlingRepaintInterval, "gfx.azpc.fling_repaint_interval", gFlingRepaintInterval); - Preferences::AddFloatVarCache(&gMinSkateSpeed, "gfx.azpc.min_skate_speed", gMinSkateSpeed); - Preferences::AddIntVarCache(&gTouchListenerTimeout, "gfx.azpc.touch_listener_timeout", gTouchListenerTimeout); - Preferences::AddIntVarCache(&gNumPaintDurationSamples, "gfx.azpc.num_paint_duration_samples", gNumPaintDurationSamples); - Preferences::AddFloatVarCache(&gTouchStartTolerance, "gfx.azpc.touch_start_tolerance", gTouchStartTolerance); - Preferences::AddFloatVarCache(&gXSkateSizeMultiplier, "gfx.azpc.x_skate_size_multiplier", gXSkateSizeMultiplier); - Preferences::AddFloatVarCache(&gYSkateSizeMultiplier, "gfx.azpc.y_skate_size_multiplier", gYSkateSizeMultiplier); - Preferences::AddFloatVarCache(&gXStationarySizeMultiplier, "gfx.azpc.x_stationary_size_multiplier", gXStationarySizeMultiplier); - Preferences::AddFloatVarCache(&gYStationarySizeMultiplier, "gfx.azpc.y_stationary_size_multiplier", gYStationarySizeMultiplier); - Preferences::AddIntVarCache(&gAsyncScrollThrottleTime, "apzc.asyncscroll.throttle", gAsyncScrollThrottleTime); - Preferences::AddIntVarCache(&gAsyncScrollTimeout, "apzc.asyncscroll.timeout", gAsyncScrollTimeout); - Preferences::AddBoolVarCache(&gAsyncZoomDisabled, "apzc.asynczoom.disabled", gAsyncZoomDisabled); - Preferences::AddBoolVarCache(&gCrossSlideEnabled, "apzc.cross_slide.enabled", gCrossSlideEnabled); - Preferences::AddIntVarCache(&gAxisLockMode, "apzc.axis_lock_mode", gAxisLockMode); + Preferences::AddIntVarCache(&gPanRepaintInterval, "apz.pan_repaint_interval", gPanRepaintInterval); + Preferences::AddIntVarCache(&gFlingRepaintInterval, "apz.fling_repaint_interval", gFlingRepaintInterval); + Preferences::AddFloatVarCache(&gMinSkateSpeed, "apz.min_skate_speed", gMinSkateSpeed); + Preferences::AddIntVarCache(&gTouchListenerTimeout, "apz.touch_listener_timeout", gTouchListenerTimeout); + Preferences::AddIntVarCache(&gNumPaintDurationSamples, "apz.num_paint_duration_samples", gNumPaintDurationSamples); + Preferences::AddFloatVarCache(&gTouchStartTolerance, "apz.touch_start_tolerance", gTouchStartTolerance); + Preferences::AddFloatVarCache(&gXSkateSizeMultiplier, "apz.x_skate_size_multiplier", gXSkateSizeMultiplier); + Preferences::AddFloatVarCache(&gYSkateSizeMultiplier, "apz.y_skate_size_multiplier", gYSkateSizeMultiplier); + Preferences::AddFloatVarCache(&gXStationarySizeMultiplier, "apz.x_stationary_size_multiplier", gXStationarySizeMultiplier); + Preferences::AddFloatVarCache(&gYStationarySizeMultiplier, "apz.y_stationary_size_multiplier", gYStationarySizeMultiplier); + Preferences::AddIntVarCache(&gAsyncScrollThrottleTime, "apz.asyncscroll.throttle", gAsyncScrollThrottleTime); + Preferences::AddIntVarCache(&gAsyncScrollTimeout, "apz.asyncscroll.timeout", gAsyncScrollTimeout); + Preferences::AddBoolVarCache(&gAsyncZoomDisabled, "apz.asynczoom.disabled", gAsyncZoomDisabled); + Preferences::AddBoolVarCache(&gCrossSlideEnabled, "apz.cross_slide.enabled", gCrossSlideEnabled); + Preferences::AddIntVarCache(&gAxisLockMode, "apz.axis_lock_mode", gAxisLockMode); gComputedTimingFunction = new ComputedTimingFunction(); gComputedTimingFunction->Init( diff --git a/gfx/layers/ipc/Axis.cpp b/gfx/layers/ipc/Axis.cpp index 37e79fb513be..401b9658aaff 100644 --- a/gfx/layers/ipc/Axis.cpp +++ b/gfx/layers/ipc/Axis.cpp @@ -67,12 +67,12 @@ static int gMaxVelocityQueueSize = 5; static void ReadAxisPrefs() { - Preferences::AddFloatVarCache(&gMaxEventAcceleration, "gfx.axis.max_event_acceleration", gMaxEventAcceleration); - Preferences::AddFloatVarCache(&gFlingFriction, "gfx.axis.fling_friction", gFlingFriction); - Preferences::AddFloatVarCache(&gVelocityThreshold, "gfx.axis.velocity_threshold", gVelocityThreshold); - Preferences::AddFloatVarCache(&gAccelerationMultiplier, "gfx.axis.acceleration_multiplier", gAccelerationMultiplier); - Preferences::AddFloatVarCache(&gFlingStoppedThreshold, "gfx.axis.fling_stopped_threshold", gFlingStoppedThreshold); - Preferences::AddIntVarCache(&gMaxVelocityQueueSize, "gfx.axis.max_velocity_queue_size", gMaxVelocityQueueSize); + Preferences::AddFloatVarCache(&gMaxEventAcceleration, "apz.max_event_acceleration", gMaxEventAcceleration); + Preferences::AddFloatVarCache(&gFlingFriction, "apz.fling_friction", gFlingFriction); + Preferences::AddFloatVarCache(&gVelocityThreshold, "apz.velocity_threshold", gVelocityThreshold); + Preferences::AddFloatVarCache(&gAccelerationMultiplier, "apz.acceleration_multiplier", gAccelerationMultiplier); + Preferences::AddFloatVarCache(&gFlingStoppedThreshold, "apz.fling_stopped_threshold", gFlingStoppedThreshold); + Preferences::AddIntVarCache(&gMaxVelocityQueueSize, "apz.max_velocity_queue_size", gMaxVelocityQueueSize); } class ReadAxisPref MOZ_FINAL : public nsRunnable { diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js index 0faf7ffdf2d5..fc03153282e7 100644 --- a/modules/libpref/src/init/all.js +++ b/modules/libpref/src/init/all.js @@ -287,7 +287,7 @@ pref("media.audio_data.enabled", true); // 0 = FREE (No locking at all) // 1 = STANDARD (Once locked, remain locked until scrolling ends) // 2 = STICKY (Allow lock to be broken, with hysteresis) -pref("apzc.axis_lock_mode", 0); +pref("apz.axis_lock_mode", 0); #ifdef XP_MACOSX // Whether to run in native HiDPI mode on machines with "Retina"/HiDPI display;