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

Commit 5b73d4d9 authored by Rachel Lee's avatar Rachel Lee Committed by Android (Google) Code Review
Browse files

Merge "getSupportedRefreshRates same as legacy on MRR" into main

parents c28b4632 d7f50487
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -1269,7 +1269,17 @@ void SurfaceFlinger::getDynamicDisplayInfoInternal(ui::DynamicDisplayInfo*& info
    ui::FrameRateCategoryRate frameRateCategoryRate(normal.getValue(), high.getValue());
    info->frameRateCategoryRate = frameRateCategoryRate;

    if (info->hasArrSupport) {
        info->supportedRefreshRates = display->refreshRateSelector().getSupportedFrameRates();
    } else {
        // On non-ARR devices, list the refresh rates same as the supported display modes.
        std::vector<float> supportedFrameRates;
        supportedFrameRates.reserve(info->supportedDisplayModes.size());
        std::transform(info->supportedDisplayModes.begin(), info->supportedDisplayModes.end(),
                       std::back_inserter(supportedFrameRates),
                       [](ui::DisplayMode mode) { return mode.peakRefreshRate; });
        info->supportedRefreshRates = supportedFrameRates;
    }
    info->activeColorMode = display->getCompositionDisplay()->getState().colorMode;
    info->hdrCapabilities = filterOut4k30(display->getHdrCapabilities());