Renderer: rewrite render scheduling (#8683)
This rewrites renderer scheduling. Occlusion is now unified in a new Pass type.
This commit is contained in:
parent
1cc1a46c2e
commit
e536b02248
42 changed files with 1576 additions and 775 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue