renderer: Tearing implementation (#3441)
This commit is contained in:
parent
1e513e25d5
commit
88b63a00b6
19 changed files with 231 additions and 61 deletions
|
|
@ -149,6 +149,14 @@ void Events::listener_monitorFrame(void* owner, void* data) {
|
|||
if (!PMONITOR->m_bEnabled)
|
||||
return;
|
||||
|
||||
if (PMONITOR->ignoreNextFlipEvent) {
|
||||
Debug::log(LOG, "Ignore next flip event for {}", PMONITOR->szName);
|
||||
PMONITOR->ignoreNextFlipEvent = false;
|
||||
return;
|
||||
}
|
||||
|
||||
PMONITOR->renderingFromVblankEvent = true;
|
||||
|
||||
static auto* const PENABLERAT = &g_pConfigManager->getConfigValuePtr("misc:render_ahead_of_time")->intValue;
|
||||
static auto* const PRATSAFE = &g_pConfigManager->getConfigValuePtr("misc:render_ahead_safezone")->intValue;
|
||||
|
||||
|
|
@ -181,6 +189,8 @@ void Events::listener_monitorFrame(void* owner, void* data) {
|
|||
} else {
|
||||
g_pHyprRenderer->renderMonitor(PMONITOR);
|
||||
}
|
||||
|
||||
PMONITOR->renderingFromVblankEvent = false;
|
||||
}
|
||||
|
||||
void Events::listener_monitorDestroy(void* owner, void* data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue