diff options
| author | Rafaël Carré <rafael.carre@gmail.com> | 2011-12-03 22:39:08 +0000 |
|---|---|---|
| committer | Rafaël Carré <rafael.carre@gmail.com> | 2011-12-03 22:39:08 +0000 |
| commit | 6b5dff4c7be02d159b7c267372f63155cc31dbb8 (patch) | |
| tree | d38d1f11c4b79c5ac83f885e1aae5fa4073eb837 | |
| parent | 26851eaaa984ceecd9f9b50b082c0835f990c726 (diff) | |
| download | rockbox-6b5dff4c7be02d159b7c267372f63155cc31dbb8.zip rockbox-6b5dff4c7be02d159b7c267372f63155cc31dbb8.tar.gz rockbox-6b5dff4c7be02d159b7c267372f63155cc31dbb8.tar.bz2 rockbox-6b5dff4c7be02d159b7c267372f63155cc31dbb8.tar.xz | |
lcd-16bit: move lcd_bitmap and lcd_bitmap_transparent to common code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31131 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/drivers/lcd-16bit-common.c | 13 | ||||
| -rw-r--r-- | firmware/drivers/lcd-16bit-vert.c | 18 | ||||
| -rw-r--r-- | firmware/drivers/lcd-16bit.c | 13 |
3 files changed, 15 insertions, 29 deletions
diff --git a/firmware/drivers/lcd-16bit-common.c b/firmware/drivers/lcd-16bit-common.c index 7253524..5f3997a 100644 --- a/firmware/drivers/lcd-16bit-common.c +++ b/firmware/drivers/lcd-16bit-common.c @@ -910,6 +910,19 @@ static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image, } while (--row); } +/* Draw a full native bitmap */ +void lcd_bitmap(const fb_data *src, int x, int y, int width, int height) +{ + lcd_bitmap_part(src, 0, 0, STRIDE(SCREEN_MAIN, width, height), x, y, width, height); +} + +/* Draw a full native bitmap with a transparent color */ +void lcd_bitmap_transparent(const fb_data *src, int x, int y, + int width, int height) +{ + lcd_bitmap_transparent_part(src, 0, 0, + STRIDE(SCREEN_MAIN, width, height), x, y, width, height); +} /* draw alpha bitmap for anti-alias font */ void ICODE_ATTR lcd_alpha_bitmap_part(const unsigned char *src, int src_x, diff --git a/firmware/drivers/lcd-16bit-vert.c b/firmware/drivers/lcd-16bit-vert.c index 1d9e207..f020d74 100644 --- a/firmware/drivers/lcd-16bit-vert.c +++ b/firmware/drivers/lcd-16bit-vert.c @@ -369,7 +369,7 @@ void ICODE_ATTR lcd_bitmap_part(const fb_data *src, int src_x, int src_y, int stride, int x, int y, int width, int height) { - fb_data *dst, *dst_end; + fb_data *dst; /******************** Image in viewport clipping **********************/ /* nothing to draw? */ @@ -427,7 +427,7 @@ void ICODE_ATTR lcd_bitmap_part(const fb_data *src, int src_x, int src_y, src += stride * src_x + src_y; /* move starting point */ dst = LCDADDR(x, y); - dst_end = dst + width * LCD_HEIGHT; + fb_data *dst_end = dst + width * LCD_HEIGHT; do { @@ -438,12 +438,6 @@ void ICODE_ATTR lcd_bitmap_part(const fb_data *src, int src_x, int src_y, while (dst < dst_end); } -/* Draw a full native bitmap */ -void lcd_bitmap(const fb_data *src, int x, int y, int width, int height) -{ - lcd_bitmap_part(src, 0, 0, STRIDE(SCREEN_MAIN, width, height), x, y, width, height); -} - /* Draw a partial native bitmap */ void ICODE_ATTR lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y, int stride, int x, @@ -524,11 +518,3 @@ void ICODE_ATTR lcd_bitmap_transparent_part(const fb_data *src, int src_x, } while (dst < dst_end); } - -/* Draw a full native bitmap with a transparent color */ -void lcd_bitmap_transparent(const fb_data *src, int x, int y, - int width, int height) -{ - lcd_bitmap_transparent_part(src, 0, 0, - STRIDE(SCREEN_MAIN, width, height), x, y, width, height); -} diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index 60dfc7b..f7d3cf2 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c @@ -437,12 +437,6 @@ void ICODE_ATTR lcd_bitmap_part(const fb_data *src, int src_x, int src_y, while (--height > 0); } -/* Draw a full native bitmap */ -void lcd_bitmap(const fb_data *src, int x, int y, int width, int height) -{ - lcd_bitmap_part(src, 0, 0, width, x, y, width, height); -} - /* Draw a partial native bitmap with transparency and foreground colors */ void ICODE_ATTR lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y, int stride, int x, @@ -561,10 +555,3 @@ void ICODE_ATTR lcd_bitmap_transparent_part(const fb_data *src, int src_x, while (--height > 0); #endif } - -/* Draw a full native bitmap with transparent and foreground colors */ -void lcd_bitmap_transparent(const fb_data *src, int x, int y, - int width, int height) -{ - lcd_bitmap_transparent_part(src, 0, 0, width, x, y, width, height); -} |