Renderer: rewrite render scheduling (#8683)

This rewrites renderer scheduling. Occlusion is now unified in a new Pass type.
This commit is contained in:
Vaxry 2024-12-22 17:12:09 +01:00 committed by GitHub
parent 1cc1a46c2e
commit e536b02248
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 1576 additions and 775 deletions

View file

@ -2,6 +2,7 @@
#include "../../Compositor.hpp"
#include "../../config/ConfigValue.hpp"
#include "../../managers/eventLoop/EventLoopManager.hpp"
#include "../pass/BorderPassElement.hpp"
CHyprBorderDecoration::CHyprBorderDecoration(PHLWINDOW pWindow) : IHyprWindowDecoration(pWindow), m_pWindow(pWindow) {
;
@ -66,13 +67,24 @@ void CHyprBorderDecoration::draw(PHLMONITOR pMonitor, float const& a) {
grad.m_fAngle = normalizeAngleRad(grad.m_fAngle);
}
int borderSize = m_pWindow->getRealBorderSize();
const auto ROUNDING = m_pWindow->rounding() * pMonitor->scale;
int borderSize = m_pWindow->getRealBorderSize();
const auto ROUNDING = m_pWindow->rounding() * pMonitor->scale;
if (ANIMATED)
g_pHyprOpenGL->renderBorder(&windowBox, m_pWindow->m_cRealBorderColorPrevious, grad, m_pWindow->m_fBorderFadeAnimationProgress.value(), ROUNDING, borderSize, a);
else
g_pHyprOpenGL->renderBorder(&windowBox, grad, ROUNDING, borderSize, a);
CBorderPassElement::SBorderData data;
data.box = windowBox;
data.grad1 = grad;
data.round = ROUNDING;
data.a = a;
data.borderSize = borderSize;
if (ANIMATED) {
data.hasGrad2 = true;
data.grad1 = m_pWindow->m_cRealBorderColorPrevious;
data.grad2 = grad;
data.lerp = m_pWindow->m_fBorderFadeAnimationProgress.value();
}
g_pHyprRenderer->m_sRenderPass.add(makeShared<CBorderPassElement>(data));
}
eDecorationType CHyprBorderDecoration::getDecorationType() {