aboutsummaryrefslogtreecommitdiff
path: root/niri-visual-tests/src/test_window.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-04-10 08:53:35 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-04-10 09:14:04 +0400
commit18886965673e3f9d5faec0bafd09f68be2d9db45 (patch)
tree4cfc7fbf7c5b9b87fca7c47e672a6c47cc06855a /niri-visual-tests/src/test_window.rs
parentb9e789619f91d4b542618cb19b0fa27cd2e052c7 (diff)
downloadniri-18886965673e3f9d5faec0bafd09f68be2d9db45.tar.gz
niri-18886965673e3f9d5faec0bafd09f68be2d9db45.tar.bz2
niri-18886965673e3f9d5faec0bafd09f68be2d9db45.zip
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
Diffstat (limited to 'niri-visual-tests/src/test_window.rs')
-rw-r--r--niri-visual-tests/src/test_window.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/niri-visual-tests/src/test_window.rs b/niri-visual-tests/src/test_window.rs
index 8dc33b88..9b8b80a2 100644
--- a/niri-visual-tests/src/test_window.rs
+++ b/niri-visual-tests/src/test_window.rs
@@ -2,9 +2,7 @@ use std::cell::RefCell;
use std::cmp::{max, min};
use std::rc::Rc;
-use niri::layout::{
- LayoutElement, LayoutElementRenderElement, LayoutElementSnapshotRenderElements,
-};
+use niri::layout::{LayoutElement, LayoutElementRenderElement, LayoutElementRenderSnapshot};
use niri::render_helpers::renderer::NiriRenderer;
use niri::render_helpers::{RenderSnapshot, RenderTarget};
use niri::window::ResolvedWindowRules;
@@ -175,7 +173,7 @@ impl LayoutElement for TestWindow {
]
}
- fn take_last_render(&self) -> RenderSnapshot<LayoutElementSnapshotRenderElements> {
+ fn take_last_render(&self) -> LayoutElementRenderSnapshot {
RenderSnapshot::default()
}