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

Commit e1a5bcb2 authored by Ady Abraham's avatar Ady Abraham
Browse files

SurfaceFlinger: generate invalidate after setActiveConfig

ag/7074109 removes the refresh from setActiveConfig. We need to
make sure invalidate is called after calling setActiveConfig and to check
the fence and update out internal state.

Test: scroll within calendar app and observe systraces
Bug: 123661966
Change-Id: Ib83949a1fe855f3852808da8c4f8b4fb55f05f8c
parent 325eb208
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -980,7 +980,7 @@ bool SurfaceFlinger::performSetActiveConfig() {
        if (mPreviousPresentFence != Fence::NO_FENCE &&
            (mPreviousPresentFence->getStatus() == Fence::Status::Unsignaled)) {
            // fence has not signaled yet. wait for the next invalidate
            repaintEverythingForHWC();
            mEventQueue->invalidateForHWC();
            return true;
        }

@@ -1031,7 +1031,7 @@ bool SurfaceFlinger::performSetActiveConfig() {

    // we need to submit an empty frame to HWC to start the process
    mCheckPendingFence = true;

    mEventQueue->invalidateForHWC();
    return false;
}

@@ -1447,10 +1447,6 @@ void SurfaceFlinger::setRefreshRateTo(RefreshRateType refreshRate, Scheduler::Co
        return;
    }

    if (desiredConfigId == display->getActiveConfig()) {
        return;
    }

    setDesiredActiveConfig({refreshRate, desiredConfigId, event});
}