mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
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
This commit is contained in:
parent
2570909e52
commit
c36d7768c5
13 changed files with 41 additions and 11 deletions
|
|
@ -335,7 +335,7 @@ void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int heig
|
|||
lcd_mono_bitmap_part(src, 0, 0, width, x, y, width, height);
|
||||
}
|
||||
|
||||
|
||||
#ifndef DISABLE_ALPHA_BITMAP
|
||||
/* About Rockbox' internal alpha channel format (for ALPHA_BPP == 4)
|
||||
*
|
||||
* 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(
|
|||
|
||||
BLEND_FINISH;
|
||||
}
|
||||
#endif /* !DISABLE_ALPHA_BITMAP */
|
||||
|
|
@ -47,11 +47,13 @@
|
|||
extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_backdrop[];
|
||||
extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_bgcolor[];
|
||||
|
||||
#ifndef DISABLE_ALPHA_BITMAP
|
||||
static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image,
|
||||
const unsigned char *src, int src_x,
|
||||
int src_y, int x, int y,
|
||||
int width, int height,
|
||||
int stride_image, int stride_src);
|
||||
#endif /* !DISABLE_ALPHA_BITMAP */
|
||||
|
||||
#include "lcd-color-common.c"
|
||||
#include "lcd-bitmap-common.c"
|
||||
|
|
|
|||
|
|
@ -47,12 +47,13 @@
|
|||
extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_backdrop[];
|
||||
extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_bgcolor[];
|
||||
|
||||
#ifndef DISABLE_ALPHA_BITMAP
|
||||
static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image,
|
||||
const unsigned char *src, int src_x,
|
||||
int src_y, int x, int y,
|
||||
int width, int height,
|
||||
int stride_image, int stride_src);
|
||||
|
||||
#endif /* !DISABLE_ALPHA_BITMAP */
|
||||
#include "lcd-color-common.c"
|
||||
#include "lcd-bitmap-common.c"
|
||||
#include "lcd-16bit-common.c"
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@
|
|||
|
||||
extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_backdrop[];
|
||||
extern lcd_fastpixelfunc_type* const lcd_fastpixelfuncs_bgcolor[];
|
||||
|
||||
#ifndef DISABLE_ALPHA_BITMAP
|
||||
static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image,
|
||||
const unsigned char *src, int src_x,
|
||||
int src_y, int x, int y,
|
||||
int width, int height,
|
||||
int stride_image, int stride_src);
|
||||
|
||||
#endif /* !DISABLE_ALPHA_BITMAP */
|
||||
#include "lcd-color-common.c"
|
||||
#include "lcd-bitmap-common.c"
|
||||
|
||||
|
|
|
|||
|
|
@ -563,7 +563,7 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str)
|
|||
|
||||
bits = font_get_bits(pf, *ucs);
|
||||
|
||||
#if defined(MAIN_LCD) && defined(HAVE_LCD_COLOR)
|
||||
#if defined(MAIN_LCD) && defined(HAVE_LCD_COLOR) && !defined(DISABLE_ALPHA_BITMAP)
|
||||
if (pf->depth)
|
||||
lcd_alpha_bitmap_part(bits, ofs, 0, width, x, y,
|
||||
width - ofs, pf->height);
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ void lcd_bitmap_transparent(const fb_data *src, int x, int y,
|
|||
STRIDE(SCREEN_MAIN, width, height), x, y, width, height);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_ALPHA_BITMAP
|
||||
/* draw alpha bitmap for anti-alias font */
|
||||
void ICODE_ATTR lcd_alpha_bitmap_part(const unsigned char *src, int src_x,
|
||||
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,
|
|||
{
|
||||
lcd_alpha_bitmap_part_mix(NULL, src, src_x, src_y, x, y, width, height, 0, stride);
|
||||
}
|
||||
#endif /* !DISABLE_ALPHA_BITMAP */
|
||||
|
||||
/* Draw a partial bitmap (mono or native) including alpha channel */
|
||||
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,
|
|||
int bitmap_stride = LCD_FBSTRIDE(bm->width, bm->height);
|
||||
if (bm->format == FORMAT_MONO)
|
||||
lcd_mono_bitmap_part(bm->data, src_x, src_y, bm->width, x, y, width, height);
|
||||
#ifndef DISABLE_ALPHA_BITMAP
|
||||
else if (bm->alpha_offset > 0)
|
||||
lcd_alpha_bitmap_part_mix((fb_data*)bm->data, bm->data+bm->alpha_offset,
|
||||
src_x, src_y, x, y, width, height,
|
||||
bitmap_stride, ALIGN_UP(bm->width, 2));
|
||||
#endif /* !DISABLE_ALPHA_BITMAP */
|
||||
else
|
||||
lcd_bitmap_transparent_part((fb_data*)bm->data,
|
||||
src_x, src_y, bitmap_stride, x, y, width, height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue