Merge "fix uninitialization issue in JankTracker" into rvc-dev-plus-aosp am: 5bf2b05e8e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12219869

Change-Id: I81a0413c2bc7e41c94cfaba9fe4310716cd72865
This commit is contained in:
TreeHugger Robot
2020-07-30 06:45:39 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 1 deletions

View File

@@ -139,6 +139,9 @@ void JankTracker::finishFrame(const FrameInfo& frame) {
(*mGlobalData)->reportJank();
}
if (mSwapDeadline < 0) {
mSwapDeadline = frame[FrameInfoIndex::IntendedVsync] + mFrameInterval;
}
bool isTripleBuffered = (mSwapDeadline - frame[FrameInfoIndex::IntendedVsync]) > (mFrameInterval * 0.1);
mSwapDeadline = std::max(mSwapDeadline + mFrameInterval,

View File

@@ -75,7 +75,7 @@ private:
std::array<int64_t, NUM_BUCKETS> mThresholds;
int64_t mFrameInterval;
nsecs_t mSwapDeadline;
nsecs_t mSwapDeadline = -1;
// The amount of time we will erase from the total duration to account
// for SF vsync offsets with HWC2 blocking dequeueBuffers.
// (Vsync + mDequeueBlockTolerance) is the point at which we expect