mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 04:25:59 +01:00
Reject blur rendering on empty damage
This commit is contained in:
parent
42c77b01ed
commit
6bfe9162e1
1 changed files with 7 additions and 7 deletions
|
@ -480,8 +480,13 @@ void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pixman_region32_not_empty(m_RenderData.pDamage))
|
// make a damage region for this window
|
||||||
return;
|
pixman_region32_t damage;
|
||||||
|
pixman_region32_init(&damage);
|
||||||
|
pixman_region32_intersect_rect(&damage, m_RenderData.pDamage, pBox->x, pBox->y, pBox->width, pBox->height); // clip it to the box
|
||||||
|
|
||||||
|
if (!pixman_region32_not_empty(&damage))
|
||||||
|
return; // if its empty, reject.
|
||||||
|
|
||||||
// blur the main FB, it will be rendered onto the mirror
|
// blur the main FB, it will be rendered onto the mirror
|
||||||
const auto POUTFB = blurMainFramebufferWithDamage(a, pBox);
|
const auto POUTFB = blurMainFramebufferWithDamage(a, pBox);
|
||||||
|
@ -505,11 +510,6 @@ void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox,
|
||||||
glStencilFunc(GL_EQUAL, 1, -1);
|
glStencilFunc(GL_EQUAL, 1, -1);
|
||||||
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
||||||
|
|
||||||
// make a damage region for this window
|
|
||||||
pixman_region32_t damage;
|
|
||||||
pixman_region32_init(&damage);
|
|
||||||
pixman_region32_intersect_rect(&damage, m_RenderData.pDamage, pBox->x, pBox->y, pBox->width, pBox->height); // clip it to the box
|
|
||||||
|
|
||||||
// stencil done. Render everything.
|
// stencil done. Render everything.
|
||||||
wlr_box MONITORBOX = {0, 0, m_RenderData.pMonitor->vecSize.x, m_RenderData.pMonitor->vecSize.y};
|
wlr_box MONITORBOX = {0, 0, m_RenderData.pMonitor->vecSize.x, m_RenderData.pMonitor->vecSize.y};
|
||||||
if (pixman_region32_not_empty(&damage)) {
|
if (pixman_region32_not_empty(&damage)) {
|
||||||
|
|
Loading…
Reference in a new issue