Remove unneeded and unwanted parameter checking from lcd_yuv_blit() - bring the ipod Color/Nano implementation in line with other targets

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10538 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2006-08-12 09:07:07 +00:00
parent c0b99f2e8b
commit 95b2781aff

View file

@ -418,31 +418,10 @@ void lcd_yuv_blit(unsigned char * const src[3],
int src_x, int src_y, int stride, int src_x, int src_y, int stride,
int x, int y, int width, int height) int x, int y, int width, int height)
{ {
int y0, x0, y1, x1;
int h; int h;
int y0, x0, y1, x1;
/* nothing to draw? */ width = (width + 1) & ~1;
if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT)
|| (x + width <= 0) || (y + height <= 0))
return;
/* clipping */
if (x < 0)
{
width += x;
src_x -= x;
x = 0;
}
if (y < 0)
{
height += y;
src_y -= y;
y = 0;
}
if (x + width > LCD_WIDTH)
width = LCD_WIDTH - x;
if (y + height > LCD_HEIGHT)
height = LCD_HEIGHT - y;
/* calculate the drawing region */ /* calculate the drawing region */
#if CONFIG_LCD == LCD_IPODNANO #if CONFIG_LCD == LCD_IPODNANO