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

Commit 89fbb6e4 authored by ramindani's avatar ramindani
Browse files

Adds hasArrSupport api support

BUG: 361433651
Test: Test: atest DisplayModeDirectorTest && atest BrightnessObserverTest && atest SettingsObserverTest
Flag: com.android.server.display.feature.flags.enable_has_arr_support
Change-Id: Ie9f16c229a22d404acd70ae9898fe3feacbcd6dc
parent 19d34947
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -2807,6 +2807,7 @@ void SurfaceComposerClient::getDynamicDisplayInfoInternal(gui::DynamicDisplayInf
    outInfo->autoLowLatencyModeSupported = ginfo.autoLowLatencyModeSupported;
    outInfo->autoLowLatencyModeSupported = ginfo.autoLowLatencyModeSupported;
    outInfo->gameContentTypeSupported = ginfo.gameContentTypeSupported;
    outInfo->gameContentTypeSupported = ginfo.gameContentTypeSupported;
    outInfo->preferredBootDisplayMode = ginfo.preferredBootDisplayMode;
    outInfo->preferredBootDisplayMode = ginfo.preferredBootDisplayMode;
    outInfo->hasArrSupport = ginfo.hasArrSupport;
}
}


status_t SurfaceComposerClient::getDynamicDisplayInfoFromId(int64_t displayId,
status_t SurfaceComposerClient::getDynamicDisplayInfoFromId(int64_t displayId,
+3 −0
Original line number Original line Diff line number Diff line
@@ -43,4 +43,7 @@ parcelable DynamicDisplayInfo {


    // The boot display mode preferred by the implementation.
    // The boot display mode preferred by the implementation.
    int preferredBootDisplayMode;
    int preferredBootDisplayMode;

    // Represents whether display supports ARR.
    boolean hasArrSupport;
}
}
+2 −0
Original line number Original line Diff line number Diff line
@@ -53,6 +53,8 @@ struct DynamicDisplayInfo {
    ui::DisplayModeId preferredBootDisplayMode;
    ui::DisplayModeId preferredBootDisplayMode;


    std::optional<ui::DisplayMode> getActiveDisplayMode() const;
    std::optional<ui::DisplayMode> getActiveDisplayMode() const;

    bool hasArrSupport;
};
};


} // namespace android::ui
} // namespace android::ui
+2 −0
Original line number Original line Diff line number Diff line
@@ -1215,6 +1215,7 @@ void SurfaceFlinger::getDynamicDisplayInfoInternal(ui::DynamicDisplayInfo*& info
    const auto mode = display->refreshRateSelector().getActiveMode();
    const auto mode = display->refreshRateSelector().getActiveMode();
    info->activeDisplayModeId = ftl::to_underlying(mode.modePtr->getId());
    info->activeDisplayModeId = ftl::to_underlying(mode.modePtr->getId());
    info->renderFrameRate = mode.fps.getValue();
    info->renderFrameRate = mode.fps.getValue();
    info->hasArrSupport = mode.modePtr->getVrrConfig() && FlagManager::getInstance().vrr_config();
    info->activeColorMode = display->getCompositionDisplay()->getState().colorMode;
    info->activeColorMode = display->getCompositionDisplay()->getState().colorMode;
    info->hdrCapabilities = filterOut4k30(display->getHdrCapabilities());
    info->hdrCapabilities = filterOut4k30(display->getHdrCapabilities());


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


    outInfo->activeDisplayModeId = info.activeDisplayModeId;
    outInfo->activeDisplayModeId = info.activeDisplayModeId;
    outInfo->renderFrameRate = info.renderFrameRate;
    outInfo->renderFrameRate = info.renderFrameRate;
    outInfo->hasArrSupport = info.hasArrSupport;


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