diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-05-04 11:10:02 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-05-04 11:10:02 +0400 |
| commit | 73cc0079d628e66b1d64168ed1a10b13b23ab5d0 (patch) | |
| tree | 168aa5d885c2061c8ec9090e1cd46b865a6f2a42 /niri-visual-tests/src/cases/tile.rs | |
| parent | 69aeba2a4d93b34eb24319c3694ad354dc608a87 (diff) | |
| download | niri-73cc0079d628e66b1d64168ed1a10b13b23ab5d0.tar.gz niri-73cc0079d628e66b1d64168ed1a10b13b23ab5d0.tar.bz2 niri-73cc0079d628e66b1d64168ed1a10b13b23ab5d0.zip | |
Split update_render_elements() from advance_animations()
advance_animations() is called from places like input, whereas
update_render_elements() is strictly for rendering.
Diffstat (limited to 'niri-visual-tests/src/cases/tile.rs')
| -rw-r--r-- | niri-visual-tests/src/cases/tile.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/niri-visual-tests/src/cases/tile.rs b/niri-visual-tests/src/cases/tile.rs index 93aa38a0..301fc19f 100644 --- a/niri-visual-tests/src/cases/tile.rs +++ b/niri-visual-tests/src/cases/tile.rs @@ -6,7 +6,7 @@ use niri::render_helpers::RenderTarget; use niri_config::Color; use smithay::backend::renderer::element::RenderElement; use smithay::backend::renderer::gles::GlesRenderer; -use smithay::utils::{Logical, Physical, Point, Scale, Size}; +use smithay::utils::{Logical, Physical, Point, Rectangle, Scale, Size}; use super::TestCase; use crate::test_window::TestWindow; @@ -94,7 +94,7 @@ impl TestCase for Tile { } fn advance_animations(&mut self, current_time: Duration) { - self.tile.advance_animations(current_time, true); + self.tile.advance_animations(current_time); } fn render( @@ -105,12 +105,15 @@ impl TestCase for Tile { let tile_size = self.tile.tile_size().to_physical(1); let location = Point::from(((size.w - tile_size.w) / 2, (size.h - tile_size.h) / 2)); + self.tile.update( + true, + Rectangle::from_loc_and_size((-location.x, -location.y), size.to_logical(1)), + ); self.tile .render( renderer, location, Scale::from(1.), - size.to_logical(1), true, RenderTarget::Output, ) |
