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

Commit 19919ff8 authored by ramindani's avatar ramindani Committed by Ram Indani
Browse files

[SF] Update to use RefreshRateChangedDebugData.refreshPeriodNanos

Checks for Interface Version is >= 3 and vrr_config flag is enabled
before using the refreshPeriodNanos

Update getDisplayConfigurationsSupported to
isVrrSupported

BUG: 314527560
Test: Check refresh rate indicator value by
faking refreshRateNanos from the AidlComposerHal::onRefreshRateChangedDebug

Change-Id: If5cac2c3101ac721f653d275d9b165c94ff2716d
parent 9a296f97
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ bool AidlComposer::isSupported(OptionalFeature feature) const {
    }
}

bool AidlComposer::getDisplayConfigurationsSupported() const {
bool AidlComposer::isVrrSupported() const {
    return mComposerInterfaceVersion >= 3 && FlagManager::getInstance().vrr_config();
}

+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ public:
    ~AidlComposer() override;

    bool isSupported(OptionalFeature) const;
    bool getDisplayConfigurationsSupported() const;
    bool isVrrSupported() const;

    std::vector<aidl::android::hardware::graphics::composer3::Capability> getCapabilities()
            override;
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ public:
    };

    virtual bool isSupported(OptionalFeature) const = 0;
    virtual bool getDisplayConfigurationsSupported() const = 0;
    virtual bool isVrrSupported() const = 0;

    virtual std::vector<aidl::android::hardware::graphics::composer3::Capability>
    getCapabilities() = 0;
+1 −1
Original line number Diff line number Diff line
@@ -321,7 +321,7 @@ std::vector<HWComposer::HWCDisplayMode> HWComposer::getModes(PhysicalDisplayId d

    const auto hwcDisplayId = mDisplayData.at(displayId).hwcDisplay->getId();

    if (mComposer->getDisplayConfigurationsSupported()) {
    if (mComposer->isVrrSupported()) {
        return getModesFromDisplayConfigurations(hwcDisplayId, maxFrameIntervalNs);
    }

+2 −2
Original line number Diff line number Diff line
@@ -276,8 +276,8 @@ bool HidlComposer::isSupported(OptionalFeature feature) const {
    }
}

bool HidlComposer::getDisplayConfigurationsSupported() const {
    // getDisplayConfigurations is not supported on the HIDL composer.
bool HidlComposer::isVrrSupported() const {
    // VRR is not supported on the HIDL composer.
    return false;
};

Loading