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

Commit f91cbc7f authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

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

parents dfe920d3 126720aa
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)) {