mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-09 16:18:10 +00:00
fixup! feat(core): introduce new drawing library
This commit is contained in:
parent
f246d98d49
commit
2f46beee66
@ -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::<BlurBuff>()]));
|
||||
|
||||
Some(Self {
|
||||
algo: None,
|
||||
|
@ -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::<u16>() * 3) + 8];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user