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

Commit 82c70c8e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SF: stay with the current mode when all votes are NO_PREF" into main

parents c72f7ddf 180d8008
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -634,11 +634,12 @@ auto RefreshRateSelector::getRankedFrameRatesLocked(const std::vector<LayerRequi
    // If all layers are category NoPreference, use the current config.
    if (noPreferenceLayers + noVoteLayers == layers.size()) {
        ALOGV("All layers NoPreference");
        const auto ascendingWithPreferred =
                rankFrameRates(anchorGroup, RefreshRateOrder::Ascending, activeMode.getId());
        constexpr float kScore = std::numeric_limits<float>::max();
        FrameRateRanking currentMode;
        currentMode.emplace_back(ScoredFrameRate{getActiveModeLocked(), kScore});
        SFTRACE_FORMAT_INSTANT("%s (All layers NoPreference)",
                               to_string(ascendingWithPreferred.front().frameRateMode.fps).c_str());
        return {ascendingWithPreferred, kNoSignals};
                              to_string(currentMode.front().frameRateMode.fps).c_str());
        return {currentMode, kNoSignals};
    }

    const bool smoothSwitchOnly = categorySmoothSwitchOnlyLayers > 0;