From 50be3b83783b57492149b235ff220a7f1519327b Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 14 Sep 2018 11:25:58 -0700 Subject: Don't run comparisons on non-jank frames Unclear why mSwapDeadline doesn't already account for this, but the handling of vsync phase offsets may be throwing things off a bit. For now just do the simple fix. Bug: 109894489 Test: builds, patch was verified by reporter Change-Id: I5a6f25ceac4986d366293fe7b5e3af64a326114c --- libs/hwui/JankTracker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/hwui/JankTracker.cpp') diff --git a/libs/hwui/JankTracker.cpp b/libs/hwui/JankTracker.cpp index e6d2a6f555ac..f2d50cd42523 100644 --- a/libs/hwui/JankTracker.cpp +++ b/libs/hwui/JankTracker.cpp @@ -146,7 +146,7 @@ void JankTracker::finishFrame(const FrameInfo& frame) { frame[FrameInfoIndex::IntendedVsync] + mFrameInterval); // If we hit the deadline, cool! - if (frame[FrameInfoIndex::FrameCompleted] < mSwapDeadline) { + if (frame[FrameInfoIndex::FrameCompleted] < mSwapDeadline || totalDuration < mFrameInterval) { if (isTripleBuffered) { mData->reportJankType(JankType::kHighInputLatency); (*mGlobalData)->reportJankType(JankType::kHighInputLatency); -- cgit v1.2.3-59-g8ed1b