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

Commit f2bf196d authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Remove unnecessary mScreenAcquired

This variable is only used for debugging, and did not have any effect on
behavior. It's also not quite the right information in a multi-display
world.

Factored out of If60218e85292c786b9fa70ecb33ee374d3a385e0. Making this
change simplifies further refactoring in re-landing that CL.

Bug: 255601557
Bug: 256196556
Bug: 241286146
Test: m
Change-Id: I062002245db8fd817e145a3aaf197bb874b00636
parent 959a7ff7
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -272,7 +272,6 @@ void Scheduler::onScreenAcquired(ConnectionHandle handle) {
        thread = mConnections[handle].thread.get();
    }
    thread->onScreenAcquired();
    mScreenAcquired = true;
}

void Scheduler::onScreenReleased(ConnectionHandle handle) {
@@ -283,7 +282,6 @@ void Scheduler::onScreenReleased(ConnectionHandle handle) {
        thread = mConnections[handle].thread.get();
    }
    thread->onScreenReleased();
    mScreenAcquired = false;
}

void Scheduler::onFrameRateOverridesChanged(ConnectionHandle handle, PhysicalDisplayId displayId) {
@@ -642,7 +640,6 @@ void Scheduler::dump(utils::Dumper& dumper) const {
        utils::Dumper::Section section(dumper, "Hardware VSYNC"sv);

        std::lock_guard lock(mHWVsyncLock);
        dumper.dump("screenAcquired"sv, mScreenAcquired.load());
        dumper.dump("hwVsyncAvailable"sv, mHWVsyncAvailable);
        dumper.dump("hwVsyncEnabled"sv, mPrimaryHWVsyncEnabled);
    }
+0 −3
Original line number Diff line number Diff line
@@ -439,9 +439,6 @@ private:
    static constexpr std::chrono::nanoseconds MAX_VSYNC_APPLIED_TIME = 200ms;

    FrameRateOverrideMappings mFrameRateOverrideMappings;

    // Keeps track of whether the screen is acquired for debug
    std::atomic<bool> mScreenAcquired = false;
};

} // namespace scheduler