forked from Mirror/niri
perf(blur): only damage when about to re-render
This commit is contained in:
@@ -90,8 +90,9 @@ layer-rule {
|
||||
|
||||
- True blur currently only works for horizontal monitor configurations. When using any sort of 90 or 270 degree
|
||||
transformations, only x-ray blur will be available.
|
||||
- True blur is rather performance intensive as of right now, since it renders itself on every frame. It is recommended
|
||||
to only enable it for surfaces that don't take up a lot of screen time (e.g. notifications, dialogs).
|
||||
- True blur is rather performance intensive as of right now, since it re-renders itself on a fixed timer as opposed to
|
||||
reacting to screen damage. It is recommended to only enable it for surfaces that don't take up a lot of screen time
|
||||
(e.g. notifications, dialogs).
|
||||
- Blur is currently only possible to be enabled through the config. Implementing both
|
||||
[KDE blur](https://wayland.app/protocols/kde-blur) and
|
||||
[background effect](https://wayland.app/protocols/ext-background-effect-v1) is planned though.
|
||||
|
||||
@@ -204,7 +204,9 @@ impl Blur {
|
||||
texture.size().w != fx_buffers.output_size().w
|
||||
|| texture.size().h != fx_buffers.output_size().h
|
||||
}
|
||||
_ => true,
|
||||
BlurVariant::True { rerender_at, .. } => {
|
||||
rerender_at.borrow().is_none_or(|r| r < Instant::now())
|
||||
}
|
||||
};
|
||||
|
||||
let variant_needs_reconfigure = match &inner.variant {
|
||||
@@ -223,8 +225,6 @@ impl Blur {
|
||||
&& !variant_needs_reconfigure
|
||||
{
|
||||
if variant_needs_rerender {
|
||||
// If we are true blur, or if our output size changed, we need to always be
|
||||
// damaged. True blur has a separate internal timer to regulate frame rate.
|
||||
inner.damage_all();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user