summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/src/GenericScrollAnimation.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /gfx/layers/apz/src/GenericScrollAnimation.cpp
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/apz/src/GenericScrollAnimation.cpp')
-rw-r--r--gfx/layers/apz/src/GenericScrollAnimation.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/gfx/layers/apz/src/GenericScrollAnimation.cpp b/gfx/layers/apz/src/GenericScrollAnimation.cpp
index 04ca8c4697..62f19fab35 100644
--- a/gfx/layers/apz/src/GenericScrollAnimation.cpp
+++ b/gfx/layers/apz/src/GenericScrollAnimation.cpp
@@ -15,6 +15,9 @@
#include "ScrollAnimationMSDPhysics.h"
#include "mozilla/StaticPrefs_general.h"
+static mozilla::LazyLogModule sApzScrollAnimLog("apz.scrollanimation");
+#define GSA_LOG(...) MOZ_LOG(sApzScrollAnimLog, LogLevel::Debug, (__VA_ARGS__))
+
namespace mozilla {
namespace layers {
@@ -101,6 +104,12 @@ bool GenericScrollAnimation::DoSample(FrameMetrics& aFrameMetrics,
// then end the animation early. Note that the initial displacement could be 0
// if the compositor ran very quickly (<1ms) after the animation was created.
// When that happens we want to make sure the animation continues.
+ GSA_LOG(
+ "Sampling GenericScrollAnimation: time %f finished %d sampledDest %s "
+ "adjustedOffset %s overscroll %s\n",
+ (now - TimeStamp::ProcessCreation()).ToMilliseconds(), finished,
+ ToString(CSSPoint::FromAppUnits(sampledDest)).c_str(),
+ ToString(adjustedOffset).c_str(), ToString(overscroll).c_str());
if (!IsZero(displacement / zoom) && IsZero(adjustedOffset / zoom)) {
// Nothing more to do - end the animation.
return false;