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:
Karl Kurbjun 2007-11-19 06:26:53 +00:00
parent fc8e09d79d
commit a8c020288c

View file

@ -81,7 +81,7 @@ void lcd_init_device(void)
/* Update a fraction of the display. */
void lcd_update_rect(int x, int y, int width, int height)
{
fb_data *dst, *src;
register fb_data *dst, *src;
if (!lcd_on)
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);
}
#else
#if 0
src = &lcd_framebuffer[y][x];
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++)
{
@ -131,10 +129,8 @@ void lcd_update_rect(int x, int y, int width, int height)
*dst=*src++;
dst-=LCD_HEIGHT;
}
src+=x;
}
#else
lcd_update();
#endif
#endif
}
@ -153,20 +149,7 @@ void lcd_update(void)
lcd_copy_buffer_rect((fb_data *)FRAME, &lcd_framebuffer[0][0],
LCD_WIDTH*LCD_HEIGHT, 1);
#else
register fb_data *dst, *src=&lcd_framebuffer[0][0];
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;
}
}
lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT);
#endif
}