diff --git a/gfx/layers/ipc/AsyncPanZoomController.cpp b/gfx/layers/ipc/AsyncPanZoomController.cpp index a8703abdb0e..e696e2fc951 100644 --- a/gfx/layers/ipc/AsyncPanZoomController.cpp +++ b/gfx/layers/ipc/AsyncPanZoomController.cpp @@ -142,12 +142,18 @@ static float gYStationarySizeMultiplier = 2.5f; */ static int gAsyncScrollThrottleTime = 100; + /** * The timeout in ms for mAsyncScrollTimeoutTask delay task. * Default is 300ms if there is no "apzc.asyncscroll.timeout" in preference. */ static int gAsyncScrollTimeout = 300; +/** + * Temporary pref for disabling zoom in metrofx on aurora. + */ +static bool gAsyncZoomDisabled = false; + static TimeStamp sFrameTime; static TimeStamp @@ -185,6 +191,7 @@ AsyncPanZoomController::InitializeGlobalState() 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); gComputedTimingFunction = new ComputedTimingFunction(); gComputedTimingFunction->Init( @@ -221,6 +228,9 @@ AsyncPanZoomController::AsyncPanZoomController(uint64_t aLayersId, if (aGestures == USE_GESTURE_DETECTOR) { mGestureEventListener = new GestureEventListener(this); } + if (gAsyncZoomDisabled) { + mAllowZoom = false; + } } AsyncPanZoomController::~AsyncPanZoomController() { @@ -1363,6 +1373,9 @@ void AsyncPanZoomController::SetZoomAndResolution(const CSSToScreenScale& aZoom) void AsyncPanZoomController::UpdateZoomConstraints(bool aAllowZoom, const CSSToScreenScale& aMinZoom, const CSSToScreenScale& aMaxZoom) { + if (gAsyncZoomDisabled) { + return; + } mAllowZoom = aAllowZoom; mMinZoom = (MIN_ZOOM > aMinZoom ? MIN_ZOOM : aMinZoom); mMaxZoom = (MAX_ZOOM > aMaxZoom ? aMaxZoom : MAX_ZOOM);