mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-12 22:52:28 -05:00
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:
parent
c0b99f2e8b
commit
95b2781aff
1 changed files with 2 additions and 23 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue