diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index 2de1da3f946f..425c3879294f 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -11,6 +11,7 @@ #include "Compositor.h" // for Compositor #include "DragTracker.h" // for DragTracker #include "gfxPrefs.h" // for gfxPrefs +#include "GenericFlingAnimation.h" // for FLING_LOG #include "HitTestingTreeNode.h" // for HitTestingTreeNode #include "InputBlockState.h" // for InputBlockState #include "InputData.h" // for InputData, etc @@ -2374,6 +2375,7 @@ ParentLayerPoint APZCTreeManager::DispatchFling( // single APZC that's scrolled by the input block that triggered this fling. if (aHandoffState.mIsHandoff && !gfxPrefs::APZAllowImmediateHandoff() && aHandoffState.mScrolledApzc == aPrev) { + FLING_LOG("APZCTM dropping handoff due to disallowed immediate handoff\n"); return aHandoffState.mVelocity; } diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 132f19b21952..3c0d0583432a 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -2258,6 +2258,7 @@ bool AsyncPanZoomController::AllowScrollHandoffInCurrentBlock() const { // Do not allow handoff beyond the first APZC to scroll. if (currentBlock->GetScrolledApzc() == this) { result = false; + APZC_LOG("%p dropping handoff; AllowImmediateHandoff=false\n", this); } } } @@ -3336,6 +3337,8 @@ void AsyncPanZoomController::HandleFlingOverscroll( true /* handoff */, aScrolledApzc}; ParentLayerPoint residualVelocity = treeManagerLocal->DispatchFling(this, handoffState); + FLING_LOG("APZC %p left with residual velocity %s\n", this, + Stringify(residualVelocity).c_str()); if (!IsZero(residualVelocity) && IsPannable() && gfxPrefs::APZOverscrollEnabled()) { // Obey overscroll-behavior. diff --git a/gfx/layers/apz/src/Axis.cpp b/gfx/layers/apz/src/Axis.cpp index 39b2c6273ae9..55095f55ac9e 100644 --- a/gfx/layers/apz/src/Axis.cpp +++ b/gfx/layers/apz/src/Axis.cpp @@ -65,9 +65,13 @@ void Axis::UpdateWithTouchAtDevicePoint(ParentLayerCoord aPos, mPos = aPos; + AXIS_LOG("%p|%s got position %f\n", mAsyncPanZoomController, Name(), + mPos.value); if (Maybe newVelocity = mVelocityTracker->AddPosition(aPos, aTimestampMs)) { mVelocity = mAxisLocked ? 0 : *newVelocity; + AXIS_LOG("%p|%s velocity from tracker is %f\n", mAsyncPanZoomController, + Name(), mVelocity); } } diff --git a/gfx/layers/apz/src/GenericFlingAnimation.h b/gfx/layers/apz/src/GenericFlingAnimation.h index 12a24bb9c9e7..19362d492c89 100644 --- a/gfx/layers/apz/src/GenericFlingAnimation.h +++ b/gfx/layers/apz/src/GenericFlingAnimation.h @@ -12,6 +12,7 @@ #include "AsyncPanZoomController.h" #include "FrameMetrics.h" #include "Layers.h" +#include "LayersLogging.h" #include "Units.h" #include "OverscrollHandoffState.h" #include "gfxPrefs.h"