|
92 | 92 | #include <ui/DisplayStatInfo.h> |
93 | 93 | #include <ui/DisplayState.h> |
94 | 94 | #include <ui/DynamicDisplayInfo.h> |
| 95 | +#include <ui/FrameRateCategoryRate.h> |
95 | 96 | #include <ui/GraphicBufferAllocator.h> |
96 | 97 | #include <ui/HdrRenderTypeUtils.h> |
97 | 98 | #include <ui/LayerStack.h> |
@@ -1217,6 +1218,10 @@ void SurfaceFlinger::getDynamicDisplayInfoInternal(ui::DynamicDisplayInfo*& info |
1217 | 1218 | info->activeDisplayModeId = ftl::to_underlying(mode.modePtr->getId()); |
1218 | 1219 | info->renderFrameRate = mode.fps.getValue(); |
1219 | 1220 | info->hasArrSupport = mode.modePtr->getVrrConfig() && FlagManager::getInstance().vrr_config(); |
| 1221 | + |
| 1222 | + const auto [normal, high] = display->refreshRateSelector().getFrameRateCategoryRates(); |
| 1223 | + ui::FrameRateCategoryRate frameRateCategoryRate(normal.getValue(), high.getValue()); |
| 1224 | + info->frameRateCategoryRate = frameRateCategoryRate; |
1220 | 1225 | info->activeColorMode = display->getCompositionDisplay()->getState().colorMode; |
1221 | 1226 | info->hdrCapabilities = filterOut4k30(display->getHdrCapabilities()); |
1222 | 1227 |
|
@@ -8496,6 +8501,9 @@ void SurfaceComposerAIDL::getDynamicDisplayInfoInternal(ui::DynamicDisplayInfo& |
8496 | 8501 | outInfo->activeDisplayModeId = info.activeDisplayModeId; |
8497 | 8502 | outInfo->renderFrameRate = info.renderFrameRate; |
8498 | 8503 | outInfo->hasArrSupport = info.hasArrSupport; |
| 8504 | + gui::FrameRateCategoryRate& frameRateCategoryRate = outInfo->frameRateCategoryRate; |
| 8505 | + frameRateCategoryRate.normal = info.frameRateCategoryRate.getNormal(); |
| 8506 | + frameRateCategoryRate.high = info.frameRateCategoryRate.getHigh(); |
8499 | 8507 |
|
8500 | 8508 | outInfo->supportedColorModes.clear(); |
8501 | 8509 | outInfo->supportedColorModes.reserve(info.supportedColorModes.size()); |
|
0 commit comments