1
0
Fork 0
forked from len0rd/rockbox

Make the transparent bitmaps work on Gigabeat S.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17118 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2008-04-15 13:06:29 +00:00
parent e50202c5c4
commit 595d0659d4
2 changed files with 13 additions and 12 deletions

View file

@ -68,7 +68,7 @@ static struct viewport default_vp =
/* The Gigabeat target build requires access to the current fg_pattern
in lcd-meg-fx.c */
#if !defined(TOSHIBA_GIGABEAT_F) || defined(SIMULATOR)
#if (!defined(TOSHIBA_GIGABEAT_F)&& !defined(TOSHIBA_GIGABEAT_S)) || defined(SIMULATOR)
static struct viewport* current_vp IDATA_ATTR = &default_vp;
#else
struct viewport* current_vp IDATA_ATTR = &default_vp;

View file

@ -11,13 +11,16 @@ static volatile bool lcd_on = true;
volatile bool lcd_poweroff = false;
static unsigned lcd_yuv_options = 0;
/*
** These are imported from lcd-16bit.c
** This is imported from lcd-16bit.c
*/
extern unsigned fg_pattern;
extern unsigned bg_pattern;
extern struct viewport* current_vp;
/* Copies a rectangle from one framebuffer to another. Can be used in
single transfer mode with width = num pixels, and height = 1 which
allows a full-width rectangle to be copied more efficiently. */
extern void lcd_copy_buffer_rect(fb_data *dst, const fb_data *src,
int width, int height);
#if 0
bool lcd_enabled()
{
@ -106,26 +109,25 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y,
int stride, int x, int y, int width,
int height)
{
#if 0
int w, px;
fb_data *dst;
if (x + width > LCD_WIDTH)
width = LCD_WIDTH - x; /* Clip right */
if (x + width > current_vp->width)
width = current_vp->width - x; /* Clip right */
if (x < 0)
width += x, x = 0; /* Clip left */
if (width <= 0)
return; /* nothing left to do */
if (y + height > LCD_HEIGHT)
height = LCD_HEIGHT - y; /* Clip bottom */
if (y + height > current_vp->height)
height = current_vp->height - y; /* Clip bottom */
if (y < 0)
height += y, y = 0; /* Clip top */
if (height <= 0)
return; /* nothing left to do */
src += stride * src_y + src_x; /* move starting point */
dst = &lcd_framebuffer[y][x];
dst = &lcd_framebuffer[current_vp->y+y][current_vp->x+x];
asm volatile (
".rowstart: \r\n"
@ -152,7 +154,6 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y,
[fgcolor]"r"(REPLACEWITHFG_COLOR),
[fgpat]"r"(current_vp->fg_pattern)
);
#endif
}
void lcd_yuv_set_options(unsigned options)