1
0
Fork 0
forked from len0rd/rockbox

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:
William Wilgus 2022-03-21 18:54:52 -04:00
parent 60e5786b48
commit cfeeb7889d
23 changed files with 78 additions and 40 deletions

View file

@ -507,7 +507,9 @@ typedef void lcd_blockfunc_type(fb_data *address, unsigned mask, unsigned bits);
extern struct viewport* lcd_current_viewport;
#define FBADDR(x,y) ((fb_data*) lcd_current_viewport->buffer->get_address_fn(x, y))
#define FB_CURRENTVP_BUFFER (lcd_current_viewport->buffer)
#define FBADDRBUF(buffer,x,y) ((fb_data*) buffer->get_address_fn(x,y))
#define FBADDR(x,y) (FBADDRBUF(lcd_current_viewport->buffer,x,y))
#define FRAMEBUFFER_SIZE (sizeof(fb_data)*LCD_FBWIDTH*LCD_FBHEIGHT)