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

Commit 6ca7eb14 authored by Ady Abraham's avatar Ady Abraham Committed by android-build-merger
Browse files

SurfaceFlinger: clamp frame refresh duration to min refresh duration am: cdd0f9d8 am: 549ea7eb

am: 8aeb8639

Change-Id: I05a17c0c6d291001dd2d3e5ba0c2ea3aaf2a855e
parents 54322025 8aeb8639
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ void LayerInfo::setLastPresentTime(nsecs_t lastPresentTime) {
    mLastPresentTime = lastPresentTime;
    // Ignore time diff that are too high - those are stale values
    if (timeDiff > OBSOLETE_TIME_EPSILON_NS.count()) return;
    const nsecs_t refreshDuration = (timeDiff > 0) ? timeDiff : mMinRefreshDuration;
    const nsecs_t refreshDuration = std::max(timeDiff, mMinRefreshDuration);
    const int fps = 1e9f / refreshDuration;
    mRefreshRateHistory.insertRefreshRate(fps);
}