mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-24 00:25:59 +01:00
fix dt issues
This commit is contained in:
parent
029d4fb805
commit
38895ce843
1 changed files with 5 additions and 3 deletions
|
@ -2598,7 +2598,9 @@ bool CHyprRenderer::beginRender(CMonitor* pMonitor, CRegion& damage, eRenderMode
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bufferAge = 0;
|
/* This is a constant expression, as we always use double-buffering in our swapchain
|
||||||
|
TODO: Rewrite the CDamageRing to take advantage of that maybe? It's made to support longer swapchains atm because we used to do wlroots */
|
||||||
|
static constexpr const int HL_BUFFER_AGE = 2;
|
||||||
|
|
||||||
if (!buffer) {
|
if (!buffer) {
|
||||||
Aquamarine::SSwapchainOptions opts = pMonitor->output->swapchain->currentOptions();
|
Aquamarine::SSwapchainOptions opts = pMonitor->output->swapchain->currentOptions();
|
||||||
|
@ -2610,7 +2612,7 @@ bool CHyprRenderer::beginRender(CMonitor* pMonitor, CRegion& damage, eRenderMode
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pCurrentBuffer = pMonitor->output->swapchain->next(&bufferAge);
|
m_pCurrentBuffer = pMonitor->output->swapchain->next(nullptr);
|
||||||
if (!m_pCurrentBuffer) {
|
if (!m_pCurrentBuffer) {
|
||||||
Debug::log(ERR, "Failed to acquire swapchain buffer for {}", pMonitor->szName);
|
Debug::log(ERR, "Failed to acquire swapchain buffer for {}", pMonitor->szName);
|
||||||
return false;
|
return false;
|
||||||
|
@ -2626,7 +2628,7 @@ bool CHyprRenderer::beginRender(CMonitor* pMonitor, CRegion& damage, eRenderMode
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == RENDER_MODE_NORMAL) {
|
if (mode == RENDER_MODE_NORMAL) {
|
||||||
damage = pMonitor->damage.getBufferDamage(bufferAge);
|
damage = pMonitor->damage.getBufferDamage(HL_BUFFER_AGE);
|
||||||
pMonitor->damage.rotate();
|
pMonitor->damage.rotate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue