From 754b0a92b9bf3d49101aa785cfa472ed9f16a201 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 13 May 2024 16:40:11 +0200 Subject: [PATCH] refactor(core/ui): enable non-conflicting modules even if unused [no changelog] --- core/embed/rust/src/trezorhal/bitblt.rs | 4 ++-- core/embed/rust/src/ui/shape/display/mod.rs | 15 +++------------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/core/embed/rust/src/trezorhal/bitblt.rs b/core/embed/rust/src/trezorhal/bitblt.rs index 4803a76593..a234cd302b 100644 --- a/core/embed/rust/src/trezorhal/bitblt.rs +++ b/core/embed/rust/src/trezorhal/bitblt.rs @@ -205,7 +205,7 @@ impl BitBltFill { } /// Fills a rectangle on the display with the specified color. - #[cfg(all(not(feature = "xframebuffer"), feature = "new_rendering"))] + #[cfg(feature = "new_rendering")] pub fn display_fill(&self) { assert!(self.bitblt.dst_x + self.bitblt.width <= ffi::DISPLAY_RESX as u16); assert!(self.bitblt.dst_y + self.bitblt.height <= ffi::DISPLAY_RESY as u16); @@ -424,7 +424,7 @@ impl<'a> BitBltCopy<'a> { /// Copies a part of the source bitmap to the display. /// /// - The source bitmap uses the RGB565 format. - #[cfg(all(not(feature = "xframebuffer"), feature = "new_rendering"))] + #[cfg(feature = "new_rendering")] pub fn display_copy(&self) { assert!(self.bitblt.dst_x + self.bitblt.width <= ffi::DISPLAY_RESX as u16); assert!(self.bitblt.dst_y + self.bitblt.height <= ffi::DISPLAY_RESY as u16); diff --git a/core/embed/rust/src/ui/shape/display/mod.rs b/core/embed/rust/src/ui/shape/display/mod.rs index e4be78b5b5..784c1c53a7 100644 --- a/core/embed/rust/src/ui/shape/display/mod.rs +++ b/core/embed/rust/src/ui/shape/display/mod.rs @@ -3,16 +3,12 @@ pub mod fb_mono8; #[cfg(all(feature = "xframebuffer", feature = "display_mono"))] pub use fb_mono8::render_on_display; -#[cfg(all(not(feature = "xframebuffer"), feature = "display_rgb565"))] +#[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", - not(feature = "display_rgba8888") -))] +#[cfg(all(feature = "xframebuffer", feature = "display_rgb565"))] pub mod fb_rgb565; #[cfg(all( feature = "xframebuffer", @@ -21,11 +17,7 @@ pub mod fb_rgb565; ))] pub use fb_rgb565::render_on_display; -#[cfg(all( - feature = "xframebuffer", - feature = "display_rgba8888", - not(feature = "display_rgb565") -))] +#[cfg(all(feature = "xframebuffer", feature = "display_rgba8888",))] pub mod fb_rgba8888; #[cfg(all( feature = "xframebuffer", @@ -34,7 +26,6 @@ pub mod fb_rgba8888; ))] pub use fb_rgba8888::render_on_display; -#[cfg(not(feature = "new_rendering"))] pub mod fake_display; #[cfg(not(feature = "new_rendering"))] pub use fake_display::render_on_display;