1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-21 05:48:23 +00:00

chore(core/rust): publish the ConcreteRenderer types for each renderer version

we need them to be able to spell out a concrete type of the argument to
`render()`
This commit is contained in:
matejcik 2024-07-05 09:38:22 +02:00 committed by matejcik
parent 083071dcb9
commit 4c10a4f643
6 changed files with 13 additions and 13 deletions

View File

@ -3,7 +3,7 @@ use crate::ui::{
shape::{render::ScopedRenderer, DirectRenderer, Mono8Canvas, Viewport},
};
type ConcreteRenderer<'a, 'alloc> = DirectRenderer<'a, 'alloc, Mono8Canvas<'alloc>>;
pub type ConcreteRenderer<'a, 'alloc> = DirectRenderer<'a, 'alloc, Mono8Canvas<'alloc>>;
pub fn render_on_display<'env, F>(_viewport: Option<Viewport>, _bg_color: Option<Color>, _func: F)
where

View File

@ -10,7 +10,7 @@ use crate::trezorhal::display;
use static_alloc::Bump;
type ConcreteRenderer<'a, 'alloc> = DirectRenderer<'a, 'alloc, Mono8Canvas<'alloc>>;
pub type ConcreteRenderer<'a, 'alloc> = DirectRenderer<'a, 'alloc, Mono8Canvas<'alloc>>;
/// Creates the `Renderer` object for drawing on a display and invokes a
/// user-defined function that takes a single argument `target`. The user's

View File

@ -10,7 +10,7 @@ use super::bumps;
use crate::trezorhal::display;
type ConcreteRenderer<'a, 'alloc> = DirectRenderer<'a, 'alloc, Rgb565Canvas<'alloc>>;
pub type ConcreteRenderer<'a, 'alloc> = DirectRenderer<'a, 'alloc, Rgb565Canvas<'alloc>>;
/// Creates the `Renderer` object for drawing on a display and invokes a
/// user-defined function that takes a single argument `target`. The user's

View File

@ -10,7 +10,7 @@ use super::bumps;
use crate::trezorhal::display;
type ConcreteRenderer<'a, 'alloc> = DirectRenderer<'a, 'alloc, Rgba8888Canvas<'alloc>>;
pub type ConcreteRenderer<'a, 'alloc> = DirectRenderer<'a, 'alloc, Rgba8888Canvas<'alloc>>;
/// Creates the `Renderer` object for drawing on a display and invokes a
/// user-defined function that takes a single argument `target`. The user's

View File

@ -15,7 +15,7 @@ pub mod nofb_rgb565;
#[cfg(not(feature = "new_rendering"))]
mod _new_rendering {
pub use super::fake_display::render_on_display;
pub use super::fake_display::{render_on_display, ConcreteRenderer};
}
#[cfg(feature = "new_rendering")]
@ -23,31 +23,31 @@ mod _new_rendering {
#[cfg(not(feature = "xframebuffer"))]
mod _xframebuffer {
#[cfg(feature = "display_rgb565")]
pub use super::super::nofb_rgb565::render_on_display;
pub use super::super::nofb_rgb565::{render_on_display, ConcreteRenderer};
#[cfg(not(feature = "display_rgb565"))]
pub use super::super::fake_display::render_on_display;
pub use super::super::fake_display::{render_on_display, ConcreteRenderer};
}
#[cfg(feature = "xframebuffer")]
mod _xframebuffer {
#[cfg(feature = "display_rgb565")]
pub use super::super::fb_rgb565::render_on_display;
pub use super::super::fb_rgb565::{render_on_display, ConcreteRenderer};
#[cfg(all(feature = "display_rgba8888", not(feature = "display_rgb565")))]
pub use super::super::fb_rgba8888::render_on_display;
pub use super::super::fb_rgba8888::{render_on_display, ConcreteRenderer};
#[cfg(all(
feature = "display_mono",
not(feature = "display_rgb565"),
not(feature = "display_rgba8888")
))]
pub use super::super::fb_mono8::render_on_display;
pub use super::super::fb_mono8::{render_on_display, ConcreteRenderer};
}
pub use _xframebuffer::render_on_display;
pub use _xframebuffer::{render_on_display, ConcreteRenderer};
}
pub use _new_rendering::render_on_display;
pub use _new_rendering::{render_on_display, ConcreteRenderer};
pub use bumps::unlock_bumps_on_failure;

View File

@ -17,7 +17,7 @@ use super::bumps;
use static_alloc::Bump;
type ConcreteRenderer<'a, 'alloc> =
pub type ConcreteRenderer<'a, 'alloc> =
ProgressiveRenderer<'a, 'alloc, Bump<[u8; bumps::BUMP_A_SIZE]>, DisplayCanvas>;
/// Creates the `Renderer` object for drawing on a display and invokes a