From 82de66a030e6818ec3d21f49c8cdf9db31eebfa6 Mon Sep 17 00:00:00 2001 From: UjinT34 <41110182+UjinT34@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:16:52 +0300 Subject: renderer: fix frame sync (#13061) * fix commit timing timer * fix surface state lock/unlock * debug state sync todos * debug solitary vrr --- src/protocols/CommitTiming.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/protocols/CommitTiming.cpp') 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&& 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&& 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&& resource_, SP< } CCommitTimerResource::~CCommitTimerResource() { - ; + if (m_timerPresent) + g_pEventLoopManager->removeTimer(timer); } bool CCommitTimerResource::good() { -- cgit v1.2.3