mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-27 11:29:49 +01:00
pass: improve blur region detection
This commit is contained in:
parent
2e2e2e2cad
commit
2a24a61126
1 changed files with 5 additions and 2 deletions
|
@ -73,10 +73,13 @@ void CRenderPass::simplify() {
|
||||||
liveBlurRegion.add(*BB);
|
liveBlurRegion.add(*BB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// expand the region: this area needs to be proper to blur it right.
|
||||||
|
liveBlurRegion.expand(oneBlurRadius() * 2.F);
|
||||||
|
|
||||||
if (auto infringement = opaque.copy().intersect(liveBlurRegion); !infringement.empty()) {
|
if (auto infringement = opaque.copy().intersect(liveBlurRegion); !infringement.empty()) {
|
||||||
// eh, this is not the correct solution, but it will do...
|
// eh, this is not the correct solution, but it will do...
|
||||||
// TODO: is this *easily* fixable?
|
// TODO: is this *easily* fixable?
|
||||||
opaque.subtract(infringement.expand(oneBlurRadius()));
|
opaque.subtract(infringement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newDamage.subtract(opaque);
|
newDamage.subtract(opaque);
|
||||||
|
@ -117,7 +120,7 @@ CRegion CRenderPass::render(const CRegion& damage_) {
|
||||||
return damage;
|
return damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WILLBLUR) {
|
if (WILLBLUR && !*PDEBUGPASS) {
|
||||||
// combine blur regions into one that will be expanded
|
// combine blur regions into one that will be expanded
|
||||||
CRegion blurRegion;
|
CRegion blurRegion;
|
||||||
for (auto& el : m_vPassElements) {
|
for (auto& el : m_vPassElements) {
|
||||||
|
|
Loading…
Reference in a new issue