1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00

refactor(core/ui): better structured selection of render_on_display function

We should still get rid of this completely though 🤷
This commit is contained in:
matejcik 2024-05-31 11:22:15 +02:00 committed by matejcik
parent e62f0b507a
commit 27fe6810c0

View File

@ -3,34 +3,49 @@ mod direct_canvas;
pub use direct_canvas::render_on_canvas;
pub mod fake_display;
#[cfg(all(feature = "xframebuffer", feature = "display_mono"))]
pub mod fb_mono8;
#[cfg(all(feature = "xframebuffer", feature = "display_mono"))]
pub use fb_mono8::render_on_display;
#[cfg(feature = "display_rgb565")]
pub mod nofb_rgb565;
#[cfg(all(not(feature = "xframebuffer"), feature = "display_rgb565"))]
pub use nofb_rgb565::render_on_display;
#[cfg(all(feature = "xframebuffer", feature = "display_rgb565"))]
pub mod fb_rgb565;
#[cfg(all(
feature = "xframebuffer",
feature = "display_rgb565",
not(feature = "display_rgba8888")
))]
pub use fb_rgb565::render_on_display;
#[cfg(all(feature = "xframebuffer", feature = "display_rgba8888",))]
pub mod fb_rgba8888;
#[cfg(all(
feature = "xframebuffer",
feature = "display_rgba8888",
not(feature = "display_rgb565")
))]
pub use fb_rgba8888::render_on_display;
#[cfg(feature = "display_rgb565")]
pub mod nofb_rgb565;
pub mod fake_display;
#[cfg(not(feature = "new_rendering"))]
pub use fake_display::render_on_display;
mod _new_rendering {
pub use super::fake_display::render_on_display;
}
#[cfg(feature = "new_rendering")]
mod _new_rendering {
#[cfg(not(feature = "xframebuffer"))]
mod _xframebuffer {
#[cfg(feature = "display_rgb565")]
pub use super::super::nofb_rgb565::render_on_display;
#[cfg(not(feature = "display_rgb565"))]
pub use super::super::fake_display::render_on_display;
}
#[cfg(feature = "xframebuffer")]
mod _xframebuffer {
#[cfg(feature = "display_rgb565")]
pub use super::super::fb_rgb565::render_on_display;
#[cfg(all(feature = "display_rgba8888", not(feature = "display_rgb565")))]
pub use super::super::fb_rgba8888::render_on_display;
#[cfg(all(
feature = "display_mono",
not(feature = "display_rgb565"),
not(feature = "display_rgba8888")
))]
pub use super::super::fb_mono8::render_on_display;
}
pub use _xframebuffer::render_on_display;
}
pub use _new_rendering::render_on_display;