Added direct scanout
This commit is contained in:
parent
70aece8522
commit
f50c786640
7 changed files with 186 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue