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

Commit e0bc94b8 authored by Dominik Laskowski's avatar Dominik Laskowski
Browse files

SF: Remove Scheduler::resetPhaseConfiguration

Merge the only call into setPacesetterDisplay.

This does not change behavior.

Bug: 255635821
Flag: EXEMPT refactor
Test: presubmit
Change-Id: I2719e35231093273203df24272d61e998d7f0b20
parent f5048752
Loading
Loading
Loading
Loading
+6 −8
Original line number Original line Diff line number Diff line
@@ -122,6 +122,12 @@ void Scheduler::setPacesetterDisplay(PhysicalDisplayId pacesetterId) {


    demotePacesetterDisplay(kPromotionParams);
    demotePacesetterDisplay(kPromotionParams);
    promotePacesetterDisplay(pacesetterId, kPromotionParams);
    promotePacesetterDisplay(pacesetterId, kPromotionParams);

    // Cancel the pending refresh rate change, if any, before updating the phase configuration.
    mVsyncModulator->cancelRefreshRateChange();

    mVsyncConfiguration->reset();
    updatePhaseConfiguration(pacesetterSelectorPtr()->getActiveMode().fps);
}
}


void Scheduler::registerDisplay(PhysicalDisplayId displayId, RefreshRateSelectorPtr selectorPtr,
void Scheduler::registerDisplay(PhysicalDisplayId displayId, RefreshRateSelectorPtr selectorPtr,
@@ -488,14 +494,6 @@ void Scheduler::updatePhaseConfiguration(Fps refreshRate) {
                   refreshRate.getPeriod());
                   refreshRate.getPeriod());
}
}


void Scheduler::resetPhaseConfiguration(Fps refreshRate) {
    // Cancel the pending refresh rate change, if any, before updating the phase configuration.
    mVsyncModulator->cancelRefreshRateChange();

    mVsyncConfiguration->reset();
    updatePhaseConfiguration(refreshRate);
}

void Scheduler::setActiveDisplayPowerModeForRefreshRateStats(hal::PowerMode powerMode) {
void Scheduler::setActiveDisplayPowerModeForRefreshRateStats(hal::PowerMode powerMode) {
    mRefreshRateStats->setPowerMode(powerMode);
    mRefreshRateStats->setPowerMode(powerMode);
}
}
+0 −1
Original line number Original line Diff line number Diff line
@@ -188,7 +188,6 @@ public:
    }
    }


    void updatePhaseConfiguration(Fps);
    void updatePhaseConfiguration(Fps);
    void resetPhaseConfiguration(Fps) REQUIRES(kMainThreadContext);


    const VsyncConfiguration& getVsyncConfiguration() const { return *mVsyncConfiguration; }
    const VsyncConfiguration& getVsyncConfiguration() const { return *mVsyncConfiguration; }


+0 −2
Original line number Original line Diff line number Diff line
@@ -8265,8 +8265,6 @@ void SurfaceFlinger::onActiveDisplayChangedLocked(const DisplayDevice* inactiveD
    mActiveDisplayId = activeDisplay.getPhysicalId();
    mActiveDisplayId = activeDisplay.getPhysicalId();
    activeDisplay.getCompositionDisplay()->setLayerCachingTexturePoolEnabled(true);
    activeDisplay.getCompositionDisplay()->setLayerCachingTexturePoolEnabled(true);


    mScheduler->resetPhaseConfiguration(mDisplayModeController.getActiveMode(mActiveDisplayId).fps);

    // TODO(b/255635711): Check for pending mode changes on other displays.
    // TODO(b/255635711): Check for pending mode changes on other displays.
    mScheduler->setModeChangePending(false);
    mScheduler->setModeChangePending(false);