Bug 1304729 - Ensure we schedule a composite if we change the scroll position during a pinch gesture with no zoom change. r=botond
MozReview-Commit-ID: AF2aoJZ1ssG
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -1389,18 +1389,16 @@ nsEventStatus AsyncPanZoomController::On
neededDisplacement.y = -mY.ScaleWillOverscrollAmount(spanRatio, cssFocusPoint.y);
ScaleWithFocus(spanRatio, cssFocusPoint);
if (neededDisplacement != CSSPoint()) {
ScrollBy(neededDisplacement);
}
- ScheduleComposite();
-
// We don't want to redraw on every scale, so throttle it.
if (!mPinchPaintTimerSet) {
const int delay = gfxPrefs::APZScaleRepaintDelay();
if (delay >= 0) {
if (RefPtr<GeckoContentController> controller = GetGeckoContentController()) {
mPinchPaintTimerSet = true;
controller->PostDelayedTask(
NewRunnableMethod(this,
@@ -1408,16 +1406,20 @@ nsEventStatus AsyncPanZoomController::On
delay);
}
}
}
UpdateSharedCompositorFrameMetrics();
}
+ // We did a ScrollBy call above even if we didn't do a scale, so we
+ // should composite for that.
+ ScheduleComposite();
+
mLastZoomFocus = focusPoint;
}
return nsEventStatus_eConsumeNoDefault;
}
nsEventStatus AsyncPanZoomController::OnScaleEnd(const PinchGestureInput& aEvent) {
APZC_LOG("%p got a scale-end in state %d\n", this, mState);