summaryrefslogtreecommitdiff
path: root/src/protocols/CommitTiming.cpp
diff options
context:
space:
mode:
authorUjinT34 <41110182+UjinT34@users.noreply.github.com>2026-01-22 18:16:52 +0300
committerGitHub <noreply@github.com>2026-01-22 15:16:52 +0000
commit82de66a030e6818ec3d21f49c8cdf9db31eebfa6 (patch)
tree352d8b7df616b4a8038d14b578fa74357cc425a1 /src/protocols/CommitTiming.cpp
parent22fc8136a21676472b232f9462318e16b1d16745 (diff)
renderer: fix frame sync (#13061)
* fix commit timing timer * fix surface state lock/unlock * debug state sync todos * debug solitary vrr
Diffstat (limited to 'src/protocols/CommitTiming.cpp')
-rw-r--r--src/protocols/CommitTiming.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocols/CommitTiming.cpp b/src/protocols/CommitTiming.cpp
index 2fcd8e9c..bce14f6b 100644
--- a/src/protocols/CommitTiming.cpp
+++ b/src/protocols/CommitTiming.cpp
@@ -32,9 +32,7 @@ CCommitTimerResource::CCommitTimerResource(UP<CWpCommitTimerV1>&& resource_, SP<
const auto TIME_NOW = Time::steadyNow();
if (TIME_NOW > TIME) {
- // TODO: should we err here?
- // for now just do nothing I guess, thats some lag.
- m_pendingTimeout = Time::steady_dur::min();
+ m_pendingTimeout.reset();
} else
m_pendingTimeout = TIME - TIME_NOW;
});
@@ -56,6 +54,7 @@ CCommitTimerResource::CCommitTimerResource(UP<CWpCommitTimerV1>&& resource_, SP<
m_surface->m_stateQueue.unlockFirst(LOCK_REASON_TIMER);
},
nullptr);
+ g_pEventLoopManager->addTimer(timer);
} else
timer->updateTimeout(m_pendingTimeout);
@@ -64,7 +63,8 @@ CCommitTimerResource::CCommitTimerResource(UP<CWpCommitTimerV1>&& resource_, SP<
}
CCommitTimerResource::~CCommitTimerResource() {
- ;
+ if (m_timerPresent)
+ g_pEventLoopManager->removeTimer(timer);
}
bool CCommitTimerResource::good() {