diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-05 12:50:47 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-05 12:50:47 +0000 |
| commit | f50c78664042e9187c090cf780c88136c4158d10 (patch) | |
| tree | cbb27dd61f2f425a0fabeab57b3180e0a1c65756 /src/events/Monitors.cpp | |
| parent | 70aece85224dcca42e6fc596a4b68d688ad6c295 (diff) | |
Added direct scanout
Diffstat (limited to 'src/events/Monitors.cpp')
| -rw-r--r-- | src/events/Monitors.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index 427bf61d..2a0cacc5 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -109,6 +109,7 @@ void Events::listener_monitorFrame(void* owner, void* data) { static auto *const PDAMAGETRACKINGMODE = &g_pConfigManager->getConfigValuePtr("debug:damage_tracking")->intValue; static auto *const PDAMAGEBLINK = &g_pConfigManager->getConfigValuePtr("debug:damage_blink")->intValue; static auto *const PNOVFR = &g_pConfigManager->getConfigValuePtr("misc:no_vfr")->intValue; + static auto *const PNODIRECTSCANOUT = &g_pConfigManager->getConfigValuePtr("general:no_direct_scanout")->intValue; static int damageBlinkCleanup = 0; // because double-buffered @@ -154,6 +155,16 @@ void Events::listener_monitorFrame(void* owner, void* data) { g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITOR->ID); } + // Direct scanout first + if (!*PNODIRECTSCANOUT) { + if (g_pHyprRenderer->attemptDirectScanout(PMONITOR)) { + return; + } else if (g_pHyprRenderer->m_pLastScanout) { + Debug::log(LOG, "Left a direct scanout."); + g_pHyprRenderer->m_pLastScanout = nullptr; + } + } + timespec now; clock_gettime(CLOCK_MONOTONIC, &now); |
