diff options
| author | UjinT34 <41110182+UjinT34@users.noreply.github.com> | 2026-01-22 18:16:52 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-22 15:16:52 +0000 |
| commit | 82de66a030e6818ec3d21f49c8cdf9db31eebfa6 (patch) | |
| tree | 352d8b7df616b4a8038d14b578fa74357cc425a1 /src/helpers/Monitor.cpp | |
| parent | 22fc8136a21676472b232f9462318e16b1d16745 (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/helpers/Monitor.cpp')
| -rw-r--r-- | src/helpers/Monitor.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index cee9ff1b..d3b374e7 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -1823,7 +1823,10 @@ uint16_t CMonitor::isDSBlocked(bool full) { } bool CMonitor::attemptDirectScanout() { - const auto blockedReason = isDSBlocked(); + static const auto PSAME = CConfigValue<Hyprlang::INT>("debug:ds_handle_same_buffer"); + static const auto PSAMEFIFO = CConfigValue<Hyprlang::INT>("debug:ds_handle_same_buffer_fifo"); + + const auto blockedReason = isDSBlocked(); if (blockedReason) return false; @@ -1837,7 +1840,7 @@ bool CMonitor::attemptDirectScanout() { auto PBUFFER = PSURFACE->m_current.buffer.m_buffer; // #TODO this entire bit needs figuring out, vrr goes down the drain without it - if (PBUFFER == m_output->state->state().buffer) { + if (PBUFFER == m_output->state->state().buffer && *PSAME) { PSURFACE->presentFeedback(Time::steadyNow(), m_self.lock()); if (m_scanoutNeedsCursorUpdate) { @@ -1856,7 +1859,7 @@ bool CMonitor::attemptDirectScanout() { } //#TODO this entire bit is bootleg deluxe, above bit is to not make vrr go down the drain, returning early here means fifo gets forever locked. - if (PSURFACE->m_fifo) + if (PSURFACE->m_fifo && *PSAMEFIFO) PSURFACE->m_stateQueue.unlockFirst(LOCK_REASON_FIFO); return true; |
