diff options
| author | srdusr <[email protected]> | 2025-02-18 21:15:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2025-02-18 21:15:00 +0200 |
| commit | 681a023b04b513b3283d85fe157d6b38987bc42e (patch) | |
| tree | 36501b0c6323039acb9ec7d85a6faccf1cc8c883 /crates/wayland/src/elements.rs | |
| parent | 78d889c48e5b1336c73f28a2e2d5c8a571c7dd43 (diff) | |
| download | srdwm-681a023b04b513b3283d85fe157d6b38987bc42e.tar.gz srdwm-681a023b04b513b3283d85fe157d6b38987bc42e.zip | |
Fix clippy warnings surfaced by the merge
Pre-existing issues in the uncommitted rust-rewrite work (unused
imports, over-arity glyph-drawing functions, a couple of complex inline
types, or_insert_with(T::default) instead of or_default(), and one
unsimplified test-only arithmetic expression), plus two imports left
unused by switching to or_default(). None of these are behavior
changes. Full workspace build + clippy -D warnings + test suite (378
tests) all green after this.
Diffstat (limited to 'crates/wayland/src/elements.rs')
| -rw-r--r-- | crates/wayland/src/elements.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/wayland/src/elements.rs b/crates/wayland/src/elements.rs index d64a02d..de50ccf 100644 --- a/crates/wayland/src/elements.rs +++ b/crates/wayland/src/elements.rs @@ -171,8 +171,16 @@ where /// comment) or because it hasn't been attempted yet this call; either way /// the caller's fallback is the same: render `surface`'s content unrounded /// via [`surface_content_elements`]. +/// Cache entry for [`rounded_content_buffer`]: `(content_epoch, radius_bits, +/// loc, size, masked_buffer)` - keyed by [`srdwm_core::WindowId`], one entry +/// per window. The four values ahead of the buffer are exactly what that +/// function's own staleness check compares against on every call; see its +/// doc comment for why each one has to be part of the key. +pub(crate) type RoundedContentCache = std::collections::HashMap<srdwm_core::WindowId, (u64, u32, (i32, i32), (i32, i32), smithay::backend::renderer::element::memory::MemoryRenderBuffer)>; + +#[allow(clippy::too_many_arguments)] pub(crate) fn rounded_content_buffer<'a>( - cache: &'a mut std::collections::HashMap<srdwm_core::WindowId, (u64, u32, (i32, i32), (i32, i32), smithay::backend::renderer::element::memory::MemoryRenderBuffer)>, + cache: &'a mut RoundedContentCache, renderer: &mut smithay::backend::renderer::pixman::PixmanRenderer, epoch: u64, id: srdwm_core::WindowId, |