mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Speed up lcd_update_rect by ~2.5% by counting towards 0 in the loop.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23329 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c6a2964068
commit
e4921d6ab5
2 changed files with 6 additions and 2 deletions
|
|
@ -556,12 +556,15 @@ void lcd_update_rect(int x, int y, int width, int height)
|
||||||
|
|
||||||
ptr = (fb_data*)&lcd_framebuffer[y][x];
|
ptr = (fb_data*)&lcd_framebuffer[y][x];
|
||||||
|
|
||||||
|
|
||||||
|
height = ymax - y - 1; /* fix height */
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
lcd_write_data(ptr, width);
|
lcd_write_data(ptr, width);
|
||||||
ptr += LCD_WIDTH;
|
ptr += LCD_WIDTH;
|
||||||
}
|
}
|
||||||
while (++y <= ymax);
|
while (--height > 0);
|
||||||
|
|
||||||
lcd_busy = false;
|
lcd_busy = false;
|
||||||
} /* lcd_update_rect */
|
} /* lcd_update_rect */
|
||||||
|
|
|
||||||
|
|
@ -405,12 +405,13 @@ void lcd_update_rect(int x, int y, int width, int height)
|
||||||
|
|
||||||
ptr = &lcd_framebuffer[y][x];
|
ptr = &lcd_framebuffer[y][x];
|
||||||
|
|
||||||
|
height = ymax - y - 1; /* fix height */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
lcd_write_data(ptr, width);
|
lcd_write_data(ptr, width);
|
||||||
ptr += LCD_WIDTH;
|
ptr += LCD_WIDTH;
|
||||||
}
|
}
|
||||||
while (++y <= ymax);
|
while (--height > 0);
|
||||||
lcd_busy = false;
|
lcd_busy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue