diff --git a/core/embed/rust/src/ui/shape/cache/blur_cache.rs b/core/embed/rust/src/ui/shape/cache/blur_cache.rs index 2df6197cb6..098aad64dd 100644 --- a/core/embed/rust/src/ui/shape/cache/blur_cache.rs +++ b/core/embed/rust/src/ui/shape/cache/blur_cache.rs @@ -16,7 +16,10 @@ impl<'a> BlurCache<'a> { where T: LocalAllocLeakExt<'alloc>, { - let buff = bump.alloc_t()?.uninit.init(UnsafeCell::new([0; 7928])); // TODO !!! 7928 + let buff = bump + .alloc_t()? + .uninit + .init(UnsafeCell::new([0; core::mem::size_of::()])); Some(Self { algo: None, diff --git a/core/embed/rust/src/ui/shape/utils/blur.rs b/core/embed/rust/src/ui/shape/utils/blur.rs index ede81e2973..0cadb9c43c 100644 --- a/core/embed/rust/src/ui/shape/utils/blur.rs +++ b/core/embed/rust/src/ui/shape/utils/blur.rs @@ -1,4 +1,4 @@ -use crate::ui::geometry::Offset; +use crate::{trezorhal::display, ui::geometry::Offset}; /// This is a simple and fast blurring algorithm that uses a box filter - /// a square kernel with all coefficients set to 1. /// @@ -42,7 +42,7 @@ use core::mem::size_of; const MAX_RADIUS: usize = 4; const MAX_SIDE: usize = 1 + MAX_RADIUS * 2; -const MAX_WIDTH: usize = 240; +const MAX_WIDTH: usize = display::DISPLAY_RESX as usize; pub type BlurBuff = [u8; MAX_WIDTH * (MAX_SIDE * 3 + size_of::() * 3) + 8];