File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1269,7 +1269,17 @@ void SurfaceFlinger::getDynamicDisplayInfoInternal(ui::DynamicDisplayInfo*& info
12691269 ui::FrameRateCategoryRate frameRateCategoryRate (normal.getValue (), high.getValue ());
12701270 info->frameRateCategoryRate = frameRateCategoryRate;
12711271
1272- info->supportedRefreshRates = display->refreshRateSelector ().getSupportedFrameRates ();
1272+ if (info->hasArrSupport ) {
1273+ info->supportedRefreshRates = display->refreshRateSelector ().getSupportedFrameRates ();
1274+ } else {
1275+ // On non-ARR devices, list the refresh rates same as the supported display modes.
1276+ std::vector<float > supportedFrameRates;
1277+ supportedFrameRates.reserve (info->supportedDisplayModes .size ());
1278+ std::transform (info->supportedDisplayModes .begin (), info->supportedDisplayModes .end (),
1279+ std::back_inserter (supportedFrameRates),
1280+ [](ui::DisplayMode mode) { return mode.peakRefreshRate ; });
1281+ info->supportedRefreshRates = supportedFrameRates;
1282+ }
12731283 info->activeColorMode = display->getCompositionDisplay ()->getState ().colorMode ;
12741284 info->hdrCapabilities = filterOut4k30 (display->getHdrCapabilities ());
12751285
You can’t perform that action at this time.
0 commit comments