Reimplement window closing anim in an efficient way

- Keep a root surface cache to be accessible in surface destroyed()
- Only snapshot during / right before closing, rather than every frame
- Store textures rather than elements to handle scale and alpha properly
This commit is contained in:
Ivan Molodetskikh
2024-04-10 08:53:35 +04:00
parent b9e789619f
commit 1888696567
10 changed files with 286 additions and 209 deletions
+3
View File
@@ -382,6 +382,9 @@ impl XdgShellHandler for State {
let window = mapped.window.clone();
let output = output.clone();
self.backend.with_primary_renderer(|renderer| {
mapped.render_and_store_snapshot(renderer);
});
self.backend.with_primary_renderer(|renderer| {
self.niri
.layout