Skip to content

Commit 2c9c078

Browse files
Ram IndaniAndroid (Google) Code Review
authored andcommitted
Merge "Adds hasArrSupport api support" into main
2 parents 67b101b + 89fbb6e commit 2c9c078

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

libs/gui/SurfaceComposerClient.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2807,6 +2807,7 @@ void SurfaceComposerClient::getDynamicDisplayInfoInternal(gui::DynamicDisplayInf
28072807
outInfo->autoLowLatencyModeSupported = ginfo.autoLowLatencyModeSupported;
28082808
outInfo->gameContentTypeSupported = ginfo.gameContentTypeSupported;
28092809
outInfo->preferredBootDisplayMode = ginfo.preferredBootDisplayMode;
2810+
outInfo->hasArrSupport = ginfo.hasArrSupport;
28102811
}
28112812

28122813
status_t SurfaceComposerClient::getDynamicDisplayInfoFromId(int64_t displayId,

libs/gui/aidl/android/gui/DynamicDisplayInfo.aidl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,7 @@ parcelable DynamicDisplayInfo {
4343

4444
// The boot display mode preferred by the implementation.
4545
int preferredBootDisplayMode;
46+
47+
// Represents whether display supports ARR.
48+
boolean hasArrSupport;
4649
}

libs/ui/include/ui/DynamicDisplayInfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ struct DynamicDisplayInfo {
5353
ui::DisplayModeId preferredBootDisplayMode;
5454

5555
std::optional<ui::DisplayMode> getActiveDisplayMode() const;
56+
57+
bool hasArrSupport;
5658
};
5759

5860
} // namespace android::ui

services/surfaceflinger/SurfaceFlinger.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,7 @@ void SurfaceFlinger::getDynamicDisplayInfoInternal(ui::DynamicDisplayInfo*& info
12151215
const auto mode = display->refreshRateSelector().getActiveMode();
12161216
info->activeDisplayModeId = ftl::to_underlying(mode.modePtr->getId());
12171217
info->renderFrameRate = mode.fps.getValue();
1218+
info->hasArrSupport = mode.modePtr->getVrrConfig() && FlagManager::getInstance().vrr_config();
12181219
info->activeColorMode = display->getCompositionDisplay()->getState().colorMode;
12191220
info->hdrCapabilities = filterOut4k30(display->getHdrCapabilities());
12201221

@@ -8639,6 +8640,7 @@ void SurfaceComposerAIDL::getDynamicDisplayInfoInternal(ui::DynamicDisplayInfo&
86398640

86408641
outInfo->activeDisplayModeId = info.activeDisplayModeId;
86418642
outInfo->renderFrameRate = info.renderFrameRate;
8643+
outInfo->hasArrSupport = info.hasArrSupport;
86428644

86438645
outInfo->supportedColorModes.clear();
86448646
outInfo->supportedColorModes.reserve(info.supportedColorModes.size());

0 commit comments

Comments
 (0)