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

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

EventThread: add annotations for mVsyncSchedule

Split out from patch set 1 of Ieb05fc3abcf4fc20f04ea5d3595da70155de2df5.
Now that mVsyncSchedule can be changed, document that is guarded by
mMutex.

Bug: 272943830
Test: make

Change-Id: Ie4e492fa667687b36f648b566e13552f96f0d559
parent 6fc45193
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -525,7 +525,7 @@ void EventThread::threadMain(std::unique_lock<std::mutex>& lock) {

bool EventThread::shouldConsumeEvent(const DisplayEventReceiver::Event& event,
                                     const sp<EventThreadConnection>& connection) const {
    const auto throttleVsync = [&] {
    const auto throttleVsync = [&]() REQUIRES(mMutex) {
        const auto& vsyncData = event.vsync.vsyncData;
        if (connection->frameRate.isValid()) {
            return !mVsyncSchedule->getTracker()
+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ private:
    TracedOrdinal<int> mVsyncTracer;
    TracedOrdinal<std::chrono::nanoseconds> mWorkDuration GUARDED_BY(mMutex);
    std::chrono::nanoseconds mReadyDuration GUARDED_BY(mMutex);
    std::shared_ptr<scheduler::VsyncSchedule> mVsyncSchedule;
    std::shared_ptr<scheduler::VsyncSchedule> mVsyncSchedule GUARDED_BY(mMutex);
    TimePoint mLastVsyncCallbackTime GUARDED_BY(mMutex) = TimePoint::now();
    scheduler::VSyncCallbackRegistration mVsyncRegistration GUARDED_BY(mMutex);
    frametimeline::TokenManager* const mTokenManager;