From 95b2781aff0a8991256ea1ce580d0ec83cccbb63 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sat, 12 Aug 2006 09:07:07 +0000 Subject: 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 --- firmware/drivers/lcd-ipod.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'firmware') diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c index 7f881c529d..9be61f3134 100644 --- a/firmware/drivers/lcd-ipod.c +++ b/firmware/drivers/lcd-ipod.c @@ -418,31 +418,10 @@ void lcd_yuv_blit(unsigned char * const src[3], int src_x, int src_y, int stride, int x, int y, int width, int height) { - int y0, x0, y1, x1; int h; + int y0, x0, y1, x1; - /* nothing to draw? */ - 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; + width = (width + 1) & ~1; /* calculate the drawing region */ #if CONFIG_LCD == LCD_IPODNANO -- cgit v1.2.3