diff options
author | Roman Artiukhin <bahusdrive@gmail.com> | 2024-02-19 13:59:51 +0200 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2024-04-01 11:02:04 -0400 |
commit | c36d7768c539921754dd26ded343a08e11ccc0f0 (patch) | |
tree | 2001649699a6d646f6d2fc4ec5400841ee293277 /firmware/drivers/lcd-color-common.c | |
parent | 2570909e52b4121d69b0bc6638af8882dae87176 (diff) | |
download | rockbox-c36d7768c539921754dd26ded343a08e11ccc0f0.tar.gz rockbox-c36d7768c539921754dd26ded343a08e11ccc0f0.zip |
Sansa e200v2: bootloader: fit size
Max allowed size: 120860
Old thumb build: 128494
New thumb build: 118514 (fits!)
Disabled:
Logo;
alpha blending capabilities for bitmaps;
Arm stack unwinder (backtrace);
Related forum discussion: https://forums.rockbox.org/index.php/topic,54768.0.html
Fixes FS#12380
Change-Id: I978720d795cb0ef5169103e467cf8386c21d8e93
Diffstat (limited to 'firmware/drivers/lcd-color-common.c')
-rw-r--r-- | firmware/drivers/lcd-color-common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/drivers/lcd-color-common.c b/firmware/drivers/lcd-color-common.c index 5f83160dab..1ec965d816 100644 --- a/firmware/drivers/lcd-color-common.c +++ b/firmware/drivers/lcd-color-common.c | |||
@@ -166,6 +166,7 @@ void lcd_bitmap_transparent(const fb_data *src, int x, int y, | |||
166 | STRIDE(SCREEN_MAIN, width, height), x, y, width, height); | 166 | STRIDE(SCREEN_MAIN, width, height), x, y, width, height); |
167 | } | 167 | } |
168 | 168 | ||
169 | #ifndef DISABLE_ALPHA_BITMAP | ||
169 | /* draw alpha bitmap for anti-alias font */ | 170 | /* draw alpha bitmap for anti-alias font */ |
170 | void ICODE_ATTR lcd_alpha_bitmap_part(const unsigned char *src, int src_x, | 171 | void ICODE_ATTR lcd_alpha_bitmap_part(const unsigned char *src, int src_x, |
171 | int src_y, int stride, int x, int y, | 172 | int src_y, int stride, int x, int y, |
@@ -173,6 +174,7 @@ void ICODE_ATTR lcd_alpha_bitmap_part(const unsigned char *src, int src_x, | |||
173 | { | 174 | { |
174 | lcd_alpha_bitmap_part_mix(NULL, src, src_x, src_y, x, y, width, height, 0, stride); | 175 | lcd_alpha_bitmap_part_mix(NULL, src, src_x, src_y, x, y, width, height, 0, stride); |
175 | } | 176 | } |
177 | #endif /* !DISABLE_ALPHA_BITMAP */ | ||
176 | 178 | ||
177 | /* Draw a partial bitmap (mono or native) including alpha channel */ | 179 | /* Draw a partial bitmap (mono or native) including alpha channel */ |
178 | void ICODE_ATTR lcd_bmp_part(const struct bitmap* bm, int src_x, int src_y, | 180 | void ICODE_ATTR lcd_bmp_part(const struct bitmap* bm, int src_x, int src_y, |
@@ -181,10 +183,12 @@ void ICODE_ATTR lcd_bmp_part(const struct bitmap* bm, int src_x, int src_y, | |||
181 | int bitmap_stride = LCD_FBSTRIDE(bm->width, bm->height); | 183 | int bitmap_stride = LCD_FBSTRIDE(bm->width, bm->height); |
182 | if (bm->format == FORMAT_MONO) | 184 | if (bm->format == FORMAT_MONO) |
183 | lcd_mono_bitmap_part(bm->data, src_x, src_y, bm->width, x, y, width, height); | 185 | lcd_mono_bitmap_part(bm->data, src_x, src_y, bm->width, x, y, width, height); |
186 | #ifndef DISABLE_ALPHA_BITMAP | ||
184 | else if (bm->alpha_offset > 0) | 187 | else if (bm->alpha_offset > 0) |
185 | lcd_alpha_bitmap_part_mix((fb_data*)bm->data, bm->data+bm->alpha_offset, | 188 | lcd_alpha_bitmap_part_mix((fb_data*)bm->data, bm->data+bm->alpha_offset, |
186 | src_x, src_y, x, y, width, height, | 189 | src_x, src_y, x, y, width, height, |
187 | bitmap_stride, ALIGN_UP(bm->width, 2)); | 190 | bitmap_stride, ALIGN_UP(bm->width, 2)); |
191 | #endif /* !DISABLE_ALPHA_BITMAP */ | ||
188 | else | 192 | else |
189 | lcd_bitmap_transparent_part((fb_data*)bm->data, | 193 | lcd_bitmap_transparent_part((fb_data*)bm->data, |
190 | src_x, src_y, bitmap_stride, x, y, width, height); | 194 | src_x, src_y, bitmap_stride, x, y, width, height); |