mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-18 01:22:38 -05:00
Small speedup on the M:Robe LCD updates - use partial updates in landscape mode.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15680 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fc8e09d79d
commit
a8c020288c
1 changed files with 4 additions and 21 deletions
|
|
@ -81,7 +81,7 @@ void lcd_init_device(void)
|
||||||
/* Update a fraction of the display. */
|
/* Update a fraction of the display. */
|
||||||
void lcd_update_rect(int x, int y, int width, int height)
|
void lcd_update_rect(int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
fb_data *dst, *src;
|
register fb_data *dst, *src;
|
||||||
|
|
||||||
if (!lcd_on)
|
if (!lcd_on)
|
||||||
return;
|
return;
|
||||||
|
|
@ -116,12 +116,10 @@ void lcd_update_rect(int x, int y, int width, int height)
|
||||||
lcd_copy_buffer_rect(dst, src, LCD_WIDTH*height, 1);
|
lcd_copy_buffer_rect(dst, src, LCD_WIDTH*height, 1);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if 0
|
|
||||||
src = &lcd_framebuffer[y][x];
|
src = &lcd_framebuffer[y][x];
|
||||||
|
|
||||||
register int xc, yc;
|
register int xc, yc;
|
||||||
register fb_data *start=(fb_data *)FRAME + (LCD_HEIGHT-x)*LCD_WIDTH + y;
|
register fb_data *start=FRAME + LCD_HEIGHT*(LCD_WIDTH-x-1) + y + 1;
|
||||||
|
|
||||||
for(yc=0;yc<height;yc++)
|
for(yc=0;yc<height;yc++)
|
||||||
{
|
{
|
||||||
|
|
@ -131,10 +129,8 @@ void lcd_update_rect(int x, int y, int width, int height)
|
||||||
*dst=*src++;
|
*dst=*src++;
|
||||||
dst-=LCD_HEIGHT;
|
dst-=LCD_HEIGHT;
|
||||||
}
|
}
|
||||||
|
src+=x;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
lcd_update();
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -153,20 +149,7 @@ void lcd_update(void)
|
||||||
lcd_copy_buffer_rect((fb_data *)FRAME, &lcd_framebuffer[0][0],
|
lcd_copy_buffer_rect((fb_data *)FRAME, &lcd_framebuffer[0][0],
|
||||||
LCD_WIDTH*LCD_HEIGHT, 1);
|
LCD_WIDTH*LCD_HEIGHT, 1);
|
||||||
#else
|
#else
|
||||||
register fb_data *dst, *src=&lcd_framebuffer[0][0];
|
lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT);
|
||||||
register unsigned int x, y;
|
|
||||||
|
|
||||||
register fb_data *start=FRAME + LCD_HEIGHT*(LCD_WIDTH-1)+1;
|
|
||||||
|
|
||||||
for(y=0; y<LCD_HEIGHT;y++)
|
|
||||||
{
|
|
||||||
dst=start+y;
|
|
||||||
for(x=0; x<LCD_WIDTH; x++)
|
|
||||||
{
|
|
||||||
*dst=*src++;
|
|
||||||
dst-=LCD_HEIGHT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue