diff options
author | 2024-12-09 06:32:37 +0000 | |
---|---|---|
committer | 2024-12-09 06:32:37 +0000 | |
commit | 6bbe47eb6ff842e80d4bc22dba48223e9a10c878 (patch) | |
tree | 29ef78ce2889e6a7ea37173ff0505ed7063ca58f | |
parent | 5058af67f49221f84c271bf894d51dd92abbcc6f (diff) | |
parent | 5b6bca454fbf60c15b62027b785ccb89b2e14e0e (diff) |
Merge "Resync on the transaction." into main
-rw-r--r-- | services/surfaceflinger/Scheduler/Scheduler.h | 2 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/Scheduler/Scheduler.h b/services/surfaceflinger/Scheduler/Scheduler.h index 3fdddac52a..a2cdd460ca 100644 --- a/services/surfaceflinger/Scheduler/Scheduler.h +++ b/services/surfaceflinger/Scheduler/Scheduler.h @@ -209,6 +209,7 @@ public: ftl::FakeGuard guard(kMainThreadContext); resyncToHardwareVsyncLocked(id, allowToEnable, modePtr); } + void resync() override EXCLUDES(mDisplayLock); void forceNextResync() { mLastResyncTime = 0; } // Passes a vsync sample to VsyncController. Returns true if @@ -470,7 +471,6 @@ private: bool throttleVsync(TimePoint, uid_t) override; // Get frame interval Period getVsyncPeriod(uid_t) override EXCLUDES(mDisplayLock); - void resync() override EXCLUDES(mDisplayLock); void onExpectedPresentTimePosted(TimePoint expectedPresentTime) override EXCLUDES(mDisplayLock); std::unique_ptr<EventThread> mRenderEventThread; diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index bab59d11d0..d7d567c6c3 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -4566,6 +4566,7 @@ void SurfaceFlinger::setTransactionFlags(uint32_t mask, TransactionSchedule sche SFTRACE_INT("mTransactionFlags", transactionFlags); if (const bool scheduled = transactionFlags & mask; !scheduled) { + mScheduler->resync(); scheduleCommit(frameHint); } else if (frameHint == FrameHint::kActive) { // Even if the next frame is already scheduled, we should reset the idle timer |