mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
Oops (from about 2 months ago) - implement viewport support in the Gigabeat F's asm-optimised lcd_bitmap_transparent_part() function.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16525 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
25949f9cd1
commit
4d58b0d4f8
1 changed files with 5 additions and 5 deletions
|
|
@ -287,22 +287,22 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y,
|
||||||
int w, px;
|
int w, px;
|
||||||
fb_data *dst;
|
fb_data *dst;
|
||||||
|
|
||||||
if (x + width > LCD_WIDTH)
|
if (x + width > current_vp->width)
|
||||||
width = LCD_WIDTH - x; /* Clip right */
|
width = current_vp->width - x; /* Clip right */
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
width += x, x = 0; /* Clip left */
|
width += x, x = 0; /* Clip left */
|
||||||
if (width <= 0)
|
if (width <= 0)
|
||||||
return; /* nothing left to do */
|
return; /* nothing left to do */
|
||||||
|
|
||||||
if (y + height > LCD_HEIGHT)
|
if (y + height > current_vp->height)
|
||||||
height = LCD_HEIGHT - y; /* Clip bottom */
|
height = current_vp->height - y; /* Clip bottom */
|
||||||
if (y < 0)
|
if (y < 0)
|
||||||
height += y, y = 0; /* Clip top */
|
height += y, y = 0; /* Clip top */
|
||||||
if (height <= 0)
|
if (height <= 0)
|
||||||
return; /* nothing left to do */
|
return; /* nothing left to do */
|
||||||
|
|
||||||
src += stride * src_y + src_x; /* move starting point */
|
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 (
|
asm volatile (
|
||||||
".rowstart: \r\n"
|
".rowstart: \r\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue