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

Commit d43b2ffb authored by Matt Buckley's avatar Matt Buckley
Browse files

Fix PerformanceHints budget calculation

Bug: 382055833
Change-Id: Icfeec0f6c5f32608054f623e53437b9d79e5bd6a
Test: atest PerformanceHintNativeTestCases
Flag: EXEMPT ndk
parent a68ddb3b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -328,7 +328,7 @@ APerformanceHintManager* APerformanceHintManager::create(std::shared_ptr<IHintMa

bool APerformanceHintManager::canSendLoadHints(std::vector<hal::SessionHint>& hints, int64_t now) {
    mHintBudget =
            std::max(kMaxLoadHintsPerInterval,
            std::min(kMaxLoadHintsPerInterval,
                     mHintBudget +
                             static_cast<double>(now - mLastBudgetReplenish) * kReplenishRate);
    mLastBudgetReplenish = now;