mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-03 13:22:33 +00:00
chore(core): remove unused display function
[no changelog]
This commit is contained in:
parent
45417bf3bd
commit
8574289493
@ -150,9 +150,6 @@ void display_fill(const gfx_bitblt_t *bb);
|
|||||||
// Copies an RGB565 bitmap.
|
// Copies an RGB565 bitmap.
|
||||||
// This function is supported by RGB displays only.
|
// This function is supported by RGB displays only.
|
||||||
void display_copy_rgb565(const gfx_bitblt_t *bb);
|
void display_copy_rgb565(const gfx_bitblt_t *bb);
|
||||||
// Copies a MONO4 bitmap (supported only with RGB displays).
|
|
||||||
// This function is supported by RGB displays only.
|
|
||||||
void display_copy_mono4(const gfx_bitblt_t *bb);
|
|
||||||
// Copies a MONO1P bitmap.
|
// Copies a MONO1P bitmap.
|
||||||
// This function is supported by all types of displays.
|
// This function is supported by all types of displays.
|
||||||
void display_copy_mono1p(const gfx_bitblt_t *bb);
|
void display_copy_mono1p(const gfx_bitblt_t *bb);
|
||||||
|
@ -47,18 +47,4 @@ void display_copy_mono1p(const gfx_bitblt_t *bb) {
|
|||||||
gfx_rgb565_copy_mono1p(&bb_new);
|
gfx_rgb565_copy_mono1p(&bb_new);
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_copy_mono4(const gfx_bitblt_t *bb) {
|
|
||||||
display_fb_info_t fb;
|
|
||||||
|
|
||||||
if (!display_get_frame_buffer(&fb)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
gfx_bitblt_t bb_new = *bb;
|
|
||||||
bb_new.dst_row = (uint8_t *)fb.ptr + (fb.stride * bb_new.dst_y);
|
|
||||||
bb_new.dst_stride = fb.stride;
|
|
||||||
|
|
||||||
gfx_rgb565_copy_mono4(&bb_new);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -49,17 +49,4 @@ void display_copy_mono1p(const gfx_bitblt_t *bb) {
|
|||||||
gfx_rgba8888_copy_mono1p(&bb_new);
|
gfx_rgba8888_copy_mono1p(&bb_new);
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_copy_mono4(const gfx_bitblt_t *bb) {
|
|
||||||
display_fb_info_t fb;
|
|
||||||
|
|
||||||
if (!display_get_frame_buffer(&fb)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
gfx_bitblt_t bb_new = *bb;
|
|
||||||
bb_new.dst_row = (uint8_t *)fb.ptr + (fb.stride * bb_new.dst_y);
|
|
||||||
bb_new.dst_stride = fb.stride;
|
|
||||||
|
|
||||||
gfx_rgba8888_copy_mono4(&bb_new);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -310,18 +310,4 @@ void display_copy_mono1p(const gfx_bitblt_t *bb) {
|
|||||||
gfx_rgb565_copy_mono1p(&bb_new);
|
gfx_rgb565_copy_mono1p(&bb_new);
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_copy_mono4(const gfx_bitblt_t *bb) {
|
|
||||||
display_fb_info_t fb;
|
|
||||||
|
|
||||||
if (!display_get_frame_buffer(&fb)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
gfx_bitblt_t bb_new = *bb;
|
|
||||||
bb_new.dst_row = (uint16_t *)((uintptr_t)fb.ptr + fb.stride * bb_new.dst_y);
|
|
||||||
bb_new.dst_stride = fb.stride;
|
|
||||||
|
|
||||||
gfx_rgb565_copy_mono4(&bb_new);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // KERNEL_MODE
|
#endif // KERNEL_MODE
|
||||||
|
@ -130,23 +130,4 @@ void display_copy_mono1p(const gfx_bitblt_t* bb) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_copy_mono4(const gfx_bitblt_t* bb) {
|
|
||||||
set_window(bb);
|
|
||||||
|
|
||||||
const gfx_color16_t* gradient =
|
|
||||||
gfx_color16_gradient_a4(bb->src_fg, bb->src_bg);
|
|
||||||
|
|
||||||
uint8_t* src_row = (uint8_t*)bb->src_row;
|
|
||||||
uint16_t height = bb->height;
|
|
||||||
|
|
||||||
while (height-- > 0) {
|
|
||||||
for (int x = 0; x < bb->width; x++) {
|
|
||||||
uint8_t fg_data = src_row[(x + bb->src_x) / 2];
|
|
||||||
uint8_t fg_lum = (x + bb->src_x) & 1 ? fg_data >> 4 : fg_data & 0xF;
|
|
||||||
ISSUE_PIXEL_DATA(gradient[fg_lum]);
|
|
||||||
}
|
|
||||||
src_row += bb->src_stride / sizeof(*src_row);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // KERNEL_MODE
|
#endif // KERNEL_MODE
|
||||||
|
@ -196,18 +196,4 @@ void display_copy_mono1p(const gfx_bitblt_t *bb) {
|
|||||||
gfx_rgb565_copy_mono1p(&bb_new);
|
gfx_rgb565_copy_mono1p(&bb_new);
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_copy_mono4(const gfx_bitblt_t *bb) {
|
|
||||||
display_driver_t *drv = &g_display_driver;
|
|
||||||
|
|
||||||
if (!drv->initialized) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
gfx_bitblt_t bb_new = *bb;
|
|
||||||
bb_new.dst_row = drv->framebuf + (DISPLAY_RESX * bb_new.dst_y);
|
|
||||||
bb_new.dst_stride = DISPLAY_RESX * sizeof(uint16_t);
|
|
||||||
|
|
||||||
gfx_rgb565_copy_mono4(&bb_new);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -415,25 +415,6 @@ void display_copy_mono1p(const gfx_bitblt_t *bb) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_copy_mono4(const gfx_bitblt_t *bb) {
|
|
||||||
display_driver_t *drv = &g_display_driver;
|
|
||||||
|
|
||||||
if (!drv->initialized) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
gfx_bitblt_t bb_new = *bb;
|
|
||||||
bb_new.dst_row =
|
|
||||||
(uint8_t *)drv->buffer->pixels + (drv->buffer->pitch * bb_new.dst_y);
|
|
||||||
bb_new.dst_stride = drv->buffer->pitch;
|
|
||||||
|
|
||||||
#ifdef UI_COLOR_32BIT
|
|
||||||
gfx_rgba8888_copy_mono4(&bb_new);
|
|
||||||
#else
|
|
||||||
gfx_rgb565_copy_mono4(&bb_new);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#else // DISPLAY_MONO
|
#else // DISPLAY_MONO
|
||||||
|
|
||||||
void display_fill(const gfx_bitblt_t *bb) {
|
void display_fill(const gfx_bitblt_t *bb) {
|
||||||
|
Loading…
Reference in New Issue
Block a user