diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-03-21 18:54:52 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-03-21 23:53:48 -0400 |
commit | cfeeb7889d5346e2abaf9b198375df62c58b098f (patch) | |
tree | f9956033372abe7d8bffa4e04bef0662dfb0da02 /firmware/target/arm/imx233/creative-zenxfi3 | |
parent | 60e5786b481a26ca7c0c810d812bf5664a58cb44 (diff) | |
download | rockbox-cfeeb7889d5346e2abaf9b198375df62c58b098f.tar.gz rockbox-cfeeb7889d5346e2abaf9b198375df62c58b098f.zip |
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
Diffstat (limited to 'firmware/target/arm/imx233/creative-zenxfi3')
-rw-r--r-- | firmware/target/arm/imx233/creative-zenxfi3/lcd-zenxfi3.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/lcd-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/lcd-zenxfi3.c index 59496f2d24..d5f25a523c 100644 --- a/firmware/target/arm/imx233/creative-zenxfi3/lcd-zenxfi3.c +++ b/firmware/target/arm/imx233/creative-zenxfi3/lcd-zenxfi3.c | |||
@@ -188,8 +188,9 @@ void lcd_update_rect(int x, int y, int w, int h) | |||
188 | } | 188 | } |
189 | else | 189 | else |
190 | { | 190 | { |
191 | void* (*fbaddr)(int x, int y) = FB_CURRENTVP_BUFFER->get_address_fn; | ||
191 | for(int i = 0; i < h; i++) | 192 | for(int i = 0; i < h; i++) |
192 | memcpy((fb_data *)FRAME + i * w, FBADDR(x,y + i), w * sizeof(fb_data)); | 193 | memcpy((fb_data *)FRAME + i * w, fbaddr(x,y + i), w * sizeof(fb_data)); |
193 | } | 194 | } |
194 | /* WARNING The LCDIF has a limitation on the vertical count ! In 16-bit packed mode | 195 | /* WARNING The LCDIF has a limitation on the vertical count ! In 16-bit packed mode |
195 | * (which we used, ie 16-bit per pixel, 2 pixels per 32-bit words), the v_count | 196 | * (which we used, ie 16-bit per pixel, 2 pixels per 32-bit words), the v_count |