diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/lcd-16bit-common.c | 3 | ||||
-rw-r--r-- | firmware/drivers/lcd-16bit-vert.c | 2 | ||||
-rw-r--r-- | firmware/drivers/lcd-16bit.c | 3 | ||||
-rw-r--r-- | firmware/drivers/lcd-24bit.c | 4 | ||||
-rw-r--r-- | firmware/drivers/lcd-bitmap-common.c | 2 | ||||
-rw-r--r-- | firmware/drivers/lcd-color-common.c | 4 |
6 files changed, 13 insertions, 5 deletions
diff --git a/firmware/drivers/lcd-16bit-common.c b/firmware/drivers/lcd-16bit-common.c index 9d24dfe16e..ab136bf238 100644 --- a/firmware/drivers/lcd-16bit-common.c +++ b/firmware/drivers/lcd-16bit-common.c | |||
@@ -335,7 +335,7 @@ void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int heig | |||
335 | lcd_mono_bitmap_part(src, 0, 0, width, x, y, width, height); | 335 | lcd_mono_bitmap_part(src, 0, 0, width, x, y, width, height); |
336 | } | 336 | } |
337 | 337 | ||
338 | 338 | #ifndef DISABLE_ALPHA_BITMAP | |
339 | /* About Rockbox' internal alpha channel format (for ALPHA_BPP == 4) | 339 | /* About Rockbox' internal alpha channel format (for ALPHA_BPP == 4) |
340 | * | 340 | * |
341 | * For each pixel, 4bit of alpha information is stored in a byte-stream, | 341 | * For each pixel, 4bit of alpha information is stored in a byte-stream, |
@@ -654,3 +654,4 @@ static void ICODE_ATTR lcd_alpha_bitmap_part_mix( | |||
654 | 654 | ||
655 | BLEND_FINISH; | 655 | BLEND_FINISH; |
656 | } | 656 | } |
657 | #endif /* !DISABLE_ALPHA_BITMAP */ \ No newline at end of file | ||
diff --git a/firmware/drivers/lcd-16bit-vert.c b/firmware/drivers/lcd-16bit-vert.c index d4ad218d14..6532ea5121 100644 --- a/firmware/drivers/lcd-16bit-vert.c +++ b/firmware/drivers/lcd-16bit-vert.c | |||
@@ -47,11 +47,13 @@ | |||
47 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_backdrop[]; | 47 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_backdrop[]; |
48 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_bgcolor[]; | 48 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_bgcolor[]; |
49 | 49 | ||
50 | #ifndef DISABLE_ALPHA_BITMAP | ||
50 | static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image, | 51 | static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image, |
51 | const unsigned char *src, int src_x, | 52 | const unsigned char *src, int src_x, |
52 | int src_y, int x, int y, | 53 | int src_y, int x, int y, |
53 | int width, int height, | 54 | int width, int height, |
54 | int stride_image, int stride_src); | 55 | int stride_image, int stride_src); |
56 | #endif /* !DISABLE_ALPHA_BITMAP */ | ||
55 | 57 | ||
56 | #include "lcd-color-common.c" | 58 | #include "lcd-color-common.c" |
57 | #include "lcd-bitmap-common.c" | 59 | #include "lcd-bitmap-common.c" |
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index fbf6700f28..967878b2e4 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c | |||
@@ -47,12 +47,13 @@ | |||
47 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_backdrop[]; | 47 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_backdrop[]; |
48 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_bgcolor[]; | 48 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_bgcolor[]; |
49 | 49 | ||
50 | #ifndef DISABLE_ALPHA_BITMAP | ||
50 | static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image, | 51 | static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image, |
51 | const unsigned char *src, int src_x, | 52 | const unsigned char *src, int src_x, |
52 | int src_y, int x, int y, | 53 | int src_y, int x, int y, |
53 | int width, int height, | 54 | int width, int height, |
54 | int stride_image, int stride_src); | 55 | int stride_image, int stride_src); |
55 | 56 | #endif /* !DISABLE_ALPHA_BITMAP */ | |
56 | #include "lcd-color-common.c" | 57 | #include "lcd-color-common.c" |
57 | #include "lcd-bitmap-common.c" | 58 | #include "lcd-bitmap-common.c" |
58 | #include "lcd-16bit-common.c" | 59 | #include "lcd-16bit-common.c" |
diff --git a/firmware/drivers/lcd-24bit.c b/firmware/drivers/lcd-24bit.c index dbb7e543af..64ddf4a201 100644 --- a/firmware/drivers/lcd-24bit.c +++ b/firmware/drivers/lcd-24bit.c | |||
@@ -47,13 +47,13 @@ | |||
47 | 47 | ||
48 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_backdrop[]; | 48 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_backdrop[]; |
49 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_bgcolor[]; | 49 | extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_bgcolor[]; |
50 | 50 | #ifndef DISABLE_ALPHA_BITMAP | |
51 | static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image, | 51 | static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image, |
52 | const unsigned char *src, int src_x, | 52 | const unsigned char *src, int src_x, |
53 | int src_y, int x, int y, | 53 | int src_y, int x, int y, |
54 | int width, int height, | 54 | int width, int height, |
55 | int stride_image, int stride_src); | 55 | int stride_image, int stride_src); |
56 | 56 | #endif /* !DISABLE_ALPHA_BITMAP */ | |
57 | #include "lcd-color-common.c" | 57 | #include "lcd-color-common.c" |
58 | #include "lcd-bitmap-common.c" | 58 | #include "lcd-bitmap-common.c" |
59 | 59 | ||
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index 975c494b5a..75d31e3453 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c | |||
@@ -563,7 +563,7 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str) | |||
563 | 563 | ||
564 | bits = font_get_bits(pf, *ucs); | 564 | bits = font_get_bits(pf, *ucs); |
565 | 565 | ||
566 | #if defined(MAIN_LCD) && defined(HAVE_LCD_COLOR) | 566 | #if defined(MAIN_LCD) && defined(HAVE_LCD_COLOR) && !defined(DISABLE_ALPHA_BITMAP) |
567 | if (pf->depth) | 567 | if (pf->depth) |
568 | lcd_alpha_bitmap_part(bits, ofs, 0, width, x, y, | 568 | lcd_alpha_bitmap_part(bits, ofs, 0, width, x, y, |
569 | width - ofs, pf->height); | 569 | width - ofs, pf->height); |
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); |