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

Commit cbd7a6d8 authored by ramindani's avatar ramindani
Browse files

[SF] Update notifyExpectedPresent parameter names

BUG: 294102485
Test: m && adb shell dumpsys SurfaceFlinger | grep -i "vrr"
Change-Id: I2acdab1b509e49a589cbc7eddf0de18fd440f07c
parent 4bb0bd5e
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -169,10 +169,8 @@ inline std::string to_string(
        out << "}, ";
        out << "notifyExpectedPresentConfig={";
        if (vrrConfig->notifyExpectedPresentConfig) {
            out << "notifyExpectedPresentHeadsUpNs="
                << vrrConfig->notifyExpectedPresentConfig->notifyExpectedPresentHeadsUpNs
                << ", notifyExpectedPresentTimeoutNs="
                << vrrConfig->notifyExpectedPresentConfig->notifyExpectedPresentTimeoutNs;
            out << "headsUpNs=" << vrrConfig->notifyExpectedPresentConfig->headsUpNs
                << ", timeoutNs=" << vrrConfig->notifyExpectedPresentConfig->timeoutNs;
        }
        out << "}}";
        return out.str();
+1 −1
Original line number Diff line number Diff line
@@ -405,7 +405,7 @@ void VSyncPredictor::setDisplayModePtr(ftl::NonNull<DisplayModePtr> modePtr) {
            : std::nullopt;
    ALOGV("%s %s: DisplayMode %s notifyExpectedPresentTimeout %s", __func__, to_string(mId).c_str(),
          to_string(*modePtr).c_str(),
          timeout ? std::to_string(timeout->notifyExpectedPresentTimeoutNs).c_str() : "N/A");
          timeout ? std::to_string(timeout->timeoutNs).c_str() : "N/A");
    std::lock_guard lock(mMutex);

    mDisplayModePtr = modePtr;
+1 −1
Original line number Diff line number Diff line
@@ -4133,7 +4133,7 @@ void SurfaceFlinger::onVsyncGenerated(TimePoint expectedPresentTime,
        const auto notifyExpectedPresentConfig =
                modePtr->getVrrConfig()->notifyExpectedPresentConfig;
        if (!notifyExpectedPresentConfig) return std::nullopt;
        return Period::fromNs(notifyExpectedPresentConfig->notifyExpectedPresentTimeoutNs);
        return Period::fromNs(notifyExpectedPresentConfig->timeoutNs);
    }();

    notifyExpectedPresentIfRequired(modePtr->getPhysicalDisplayId(), vsyncPeriod,
+2 −4
Original line number Diff line number Diff line
@@ -330,10 +330,8 @@ TEST_F(HWComposerTest, getModesWithDisplayConfigurations_VRR_ON) {
        const hal::VrrConfig vrrConfig =
                hal::VrrConfig{.minFrameIntervalNs = static_cast<Fps>(120_Hz).getPeriodNsecs(),
                               .notifyExpectedPresentConfig = hal::VrrConfig::
                                       NotifyExpectedPresentConfig{.notifyExpectedPresentHeadsUpNs =
                                                                           ms2ns(30),
                                                                   .notifyExpectedPresentTimeoutNs =
                                                                           ms2ns(30)}};
                                       NotifyExpectedPresentConfig{.headsUpNs = ms2ns(30),
                                                                   .timeoutNs = ms2ns(30)}};
        hal::DisplayConfiguration displayConfiguration{.configId = kConfigId,
                                                       .width = kWidth,
                                                       .height = kHeight,
+1 −1
Original line number Diff line number Diff line
@@ -662,7 +662,7 @@ TEST_F(VSyncPredictorTest, vsyncTrackerCallback) {

    const auto refreshRate = Fps::fromPeriodNsecs(mPeriod);
    NotifyExpectedPresentConfig notifyExpectedPresentConfig;
    notifyExpectedPresentConfig.notifyExpectedPresentTimeoutNs = Period::fromNs(30).ns();
    notifyExpectedPresentConfig.timeoutNs = Period::fromNs(30).ns();

    hal::VrrConfig vrrConfig;
    vrrConfig.notifyExpectedPresentConfig = notifyExpectedPresentConfig;