diff options
author | 2024-10-14 17:28:15 +0000 | |
---|---|---|
committer | 2024-10-14 17:28:15 +0000 | |
commit | 2c9c078368c0e47b07cdeb0e17456c26e686dc9d (patch) | |
tree | baf81f25c0c85ba3cc170f425a794022746b6f32 | |
parent | 67b101b5a69fc322e47806c7b1280ad3af556b7f (diff) | |
parent | 89fbb6e4b6eeb24662072ba627f05281c50d2d14 (diff) |
Merge "Adds hasArrSupport api support" into main
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 1 | ||||
-rw-r--r-- | libs/gui/aidl/android/gui/DynamicDisplayInfo.aidl | 3 | ||||
-rw-r--r-- | libs/ui/include/ui/DynamicDisplayInfo.h | 2 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 063aabbdef..eeea80fa82 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -2807,6 +2807,7 @@ void SurfaceComposerClient::getDynamicDisplayInfoInternal(gui::DynamicDisplayInf outInfo->autoLowLatencyModeSupported = ginfo.autoLowLatencyModeSupported; outInfo->gameContentTypeSupported = ginfo.gameContentTypeSupported; outInfo->preferredBootDisplayMode = ginfo.preferredBootDisplayMode; + outInfo->hasArrSupport = ginfo.hasArrSupport; } status_t SurfaceComposerClient::getDynamicDisplayInfoFromId(int64_t displayId, diff --git a/libs/gui/aidl/android/gui/DynamicDisplayInfo.aidl b/libs/gui/aidl/android/gui/DynamicDisplayInfo.aidl index 3114929e86..70873b001b 100644 --- a/libs/gui/aidl/android/gui/DynamicDisplayInfo.aidl +++ b/libs/gui/aidl/android/gui/DynamicDisplayInfo.aidl @@ -43,4 +43,7 @@ parcelable DynamicDisplayInfo { // The boot display mode preferred by the implementation. int preferredBootDisplayMode; + + // Represents whether display supports ARR. + boolean hasArrSupport; } diff --git a/libs/ui/include/ui/DynamicDisplayInfo.h b/libs/ui/include/ui/DynamicDisplayInfo.h index 0b77754455..25a2b6ee53 100644 --- a/libs/ui/include/ui/DynamicDisplayInfo.h +++ b/libs/ui/include/ui/DynamicDisplayInfo.h @@ -53,6 +53,8 @@ struct DynamicDisplayInfo { ui::DisplayModeId preferredBootDisplayMode; std::optional<ui::DisplayMode> getActiveDisplayMode() const; + + bool hasArrSupport; }; } // namespace android::ui diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 0ee7b31bdd..cad179cebb 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1215,6 +1215,7 @@ void SurfaceFlinger::getDynamicDisplayInfoInternal(ui::DynamicDisplayInfo*& info const auto mode = display->refreshRateSelector().getActiveMode(); info->activeDisplayModeId = ftl::to_underlying(mode.modePtr->getId()); info->renderFrameRate = mode.fps.getValue(); + info->hasArrSupport = mode.modePtr->getVrrConfig() && FlagManager::getInstance().vrr_config(); info->activeColorMode = display->getCompositionDisplay()->getState().colorMode; info->hdrCapabilities = filterOut4k30(display->getHdrCapabilities()); @@ -8639,6 +8640,7 @@ void SurfaceComposerAIDL::getDynamicDisplayInfoInternal(ui::DynamicDisplayInfo& outInfo->activeDisplayModeId = info.activeDisplayModeId; outInfo->renderFrameRate = info.renderFrameRate; + outInfo->hasArrSupport = info.hasArrSupport; outInfo->supportedColorModes.clear(); outInfo->supportedColorModes.reserve(info.supportedColorModes.size()); |