diff options
Diffstat (limited to 'src/helpers')
| -rw-r--r-- | src/helpers/Monitor.cpp | 12 | ||||
| -rw-r--r-- | src/helpers/Monitor.hpp | 8 |
2 files changed, 9 insertions, 11 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index ab581394..f0077c63 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -1724,6 +1724,10 @@ uint8_t CMonitor::isTearingBlocked(bool full) { } } + // TODO: remove this when kernel allows tearing + hw cursor updated + if (g_pPointerManager->hasVisibleHWCursor(m_self.lock())) + reasons |= TC_HW_CURSOR; + if (m_solitaryClient.expired()) { reasons |= TC_CANDIDATE; return reasons; @@ -1765,12 +1769,6 @@ uint16_t CMonitor::isDSBlocked(bool full) { } } - if (m_tearingState.activelyTearing) { - reasons |= DS_BLOCK_TEARING; - if (!full) - return reasons; - } - if (!m_mirrors.empty() || isMirror()) { reasons |= DS_BLOCK_MIRROR; if (!full) @@ -1862,7 +1860,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 && *PSAMEFIFO) + if (PSURFACE->m_fifo && !m_tearingState.activelyTearing && *PSAMEFIFO) PSURFACE->m_stateQueue.unlockFirst(LOCK_REASON_FIFO); return true; diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp index d1f9a556..3ce98d8c 100644 --- a/src/helpers/Monitor.hpp +++ b/src/helpers/Monitor.hpp @@ -233,9 +233,8 @@ class CMonitor { DS_BLOCK_SURFACE = (1 << 8), DS_BLOCK_TRANSFORM = (1 << 9), DS_BLOCK_DMA = (1 << 10), - DS_BLOCK_TEARING = (1 << 11), - DS_BLOCK_FAILED = (1 << 12), - DS_BLOCK_CM = (1 << 13), + DS_BLOCK_FAILED = (1 << 11), + DS_BLOCK_CM = (1 << 12), DS_CHECKS_COUNT = 14, }; @@ -276,8 +275,9 @@ class CMonitor { TC_SUPPORT = (1 << 4), TC_CANDIDATE = (1 << 5), TC_WINDOW = (1 << 6), + TC_HW_CURSOR = (1 << 7), - TC_CHECKS_COUNT = 7, + TC_CHECKS_COUNT = 8, }; // methods |
