mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Lcd save function pointer to frame buffer get_address_fn before loops
Calling multiple levels of indirection in a loop slows things down Really these need to be rewritten to take a start and end address like most of the rest of the codebase But this is safer without having test hardware in hand Change-Id: Idae7b92ee779d020ed7fcc9334e2d5a9c710e64d
This commit is contained in:
parent
60e5786b48
commit
cfeeb7889d
23 changed files with 78 additions and 40 deletions
|
|
@ -228,8 +228,9 @@ void lcd_update_rect(int x, int y, int w, int h)
|
|||
}
|
||||
else
|
||||
{
|
||||
void* (*fbaddr)(int x, int y) = FB_CURRENTVP_BUFFER->get_address_fn;
|
||||
for(int i = 0; i < h; i++)
|
||||
memcpy((fb_data *)FRAME + i * w, FBADDR(x,y + i), w * sizeof(fb_data));
|
||||
memcpy((fb_data *)FRAME + i * w, fbaddr(x,y + i), w * sizeof(fb_data));
|
||||
}
|
||||
/* WARNING The LCDIF has a limitation on the vertical count ! In 16-bit packed mode
|
||||
* (which we used, ie 16-bit per pixel, 2 pixels per 32-bit words), the v_count
|
||||
|
|
|
|||
|
|
@ -189,8 +189,9 @@ void lcd_update_rect(int x, int y, int w, int h)
|
|||
}
|
||||
else
|
||||
{
|
||||
void* (*fbaddr)(int x, int y) = FB_CURRENTVP_BUFFER->get_address_fn;
|
||||
for(int i = 0; i < h; i++)
|
||||
memcpy((fb_data *)FRAME + i * w, FBADDR(x,y + i), w * sizeof(fb_data));
|
||||
memcpy((fb_data *)FRAME + i * w, fbaddr(x,y + i), w * sizeof(fb_data));
|
||||
}
|
||||
/* WARNING The LCDIF has a limitation on the vertical count ! In 16-bit packed mode
|
||||
* (which we used, ie 16-bit per pixel, 2 pixels per 32-bit words), the v_count
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue