mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-19 12:58:13 +00:00
fix(core): introduce ui_overlay feature - fixes T3T1 bootloader compilation with new rendering
[no changelog]
This commit is contained in:
parent
77eeabf7f5
commit
5417ec15df
@ -845,6 +845,7 @@ def cargo_build():
|
||||
|
||||
if NEW_RENDERING and TREZOR_MODEL in ('T3T1', 'DISC2'):
|
||||
features.append('ui_image_buffer')
|
||||
features.append('ui_overlay')
|
||||
|
||||
features.extend(FEATURES_AVAILABLE)
|
||||
|
||||
|
@ -888,6 +888,7 @@ def cargo_build():
|
||||
|
||||
if NEW_RENDERING and TREZOR_MODEL in ('T3T1', ):
|
||||
features.append('ui_image_buffer')
|
||||
features.append('ui_overlay')
|
||||
|
||||
if NEW_RENDERING:
|
||||
features.append('new_rendering')
|
||||
|
@ -27,6 +27,7 @@ ui_blurring = []
|
||||
ui_jpeg_decoder = ["jpeg"]
|
||||
ui_image_buffer = []
|
||||
ui_color_32bit = []
|
||||
ui_overlay = []
|
||||
new_rendering = []
|
||||
bootloader = []
|
||||
button = []
|
||||
@ -62,6 +63,7 @@ test = [
|
||||
"ui_jpeg_decoder",
|
||||
"ui_blurring",
|
||||
"ui_image_buffer",
|
||||
"ui_overlay",
|
||||
"universal_fw",
|
||||
]
|
||||
universal_fw = []
|
||||
|
@ -1,11 +1,15 @@
|
||||
mod loader;
|
||||
|
||||
#[cfg(feature = "ui_overlay")]
|
||||
mod unlock_overlay;
|
||||
|
||||
#[cfg(feature = "ui_overlay")]
|
||||
mod keyboard_overlay;
|
||||
|
||||
#[cfg(feature = "ui_overlay")]
|
||||
pub use unlock_overlay::UnlockOverlay;
|
||||
|
||||
#[cfg(feature = "ui_overlay")]
|
||||
pub use keyboard_overlay::KeyboardOverlay;
|
||||
|
||||
pub use loader::{render_loader, LoaderRange};
|
||||
|
@ -16,17 +16,22 @@ const ZLIB_CACHE_SLOTS: usize = 1;
|
||||
#[cfg(not(feature = "xframebuffer"))]
|
||||
const ZLIB_CACHE_SLOTS: usize = 3;
|
||||
|
||||
#[cfg(not(feature = "xframebuffer"))]
|
||||
const RENDER_BUFF_SIZE: usize = (240 * 2 * 16) + ALIGN_PAD;
|
||||
|
||||
#[cfg(feature = "model_mercury")]
|
||||
#[cfg(feature = "ui_overlay")]
|
||||
const IMAGE_BUFF_SIZE: usize = 240 * 240 + ALIGN_PAD;
|
||||
#[cfg(not(feature = "model_mercury"))]
|
||||
#[cfg(not(feature = "ui_overlay"))]
|
||||
const IMAGE_BUFF_SIZE: usize = 2048 + ALIGN_PAD;
|
||||
|
||||
pub type ImageBuff = [u8; IMAGE_BUFF_SIZE];
|
||||
|
||||
#[cfg(not(feature = "xframebuffer"))]
|
||||
pub type RenderBuff = [u8; RENDER_BUFF_SIZE];
|
||||
|
||||
pub type ImageBuffRef<'a> = RefMut<'a, ImageBuff>;
|
||||
|
||||
#[cfg(not(feature = "xframebuffer"))]
|
||||
pub type RenderBuffRef<'a> = RefMut<'a, RenderBuff>;
|
||||
|
||||
pub struct DrawingCache<'a> {
|
||||
|
Loading…
Reference in New Issue
Block a user