Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b827a1ce authored by John Reck's avatar John Reck Committed by android-build-merger
Browse files

Merge "Switch JankTracker to FrameInfo::duration()" into nyc-dev

am: f91cbc7f

* commit 'f91cbc7f':
  Switch JankTracker to FrameInfo::duration()

Change-Id: I6339004d6cca3f8efaa4bc70d3a5628fc8795ef5
parents 767d3668 f91cbc7f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -212,8 +212,7 @@ void JankTracker::setFrameInterval(nsecs_t frameInterval) {
void JankTracker::addFrame(const FrameInfo& frame) {
    mData->totalFrameCount++;
    // Fast-path for jank-free frames
    int64_t totalDuration =
            frame[FrameInfoIndex::FrameCompleted] - frame[sFrameStart];
    int64_t totalDuration = frame.duration(sFrameStart, FrameInfoIndex::FrameCompleted);
    uint32_t framebucket = frameCountIndexForFrameTime(totalDuration);
    // Keep the fast path as fast as possible.
    if (CC_LIKELY(totalDuration < mFrameInterval)) {