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/coldfire/mpio/hd300 | |
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/coldfire/mpio/hd300')
-rw-r--r-- | firmware/target/coldfire/mpio/hd300/lcd-hd300.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/target/coldfire/mpio/hd300/lcd-hd300.c b/firmware/target/coldfire/mpio/hd300/lcd-hd300.c index 509ed4cd53..9cff9cd712 100644 --- a/firmware/target/coldfire/mpio/hd300/lcd-hd300.c +++ b/firmware/target/coldfire/mpio/hd300/lcd-hd300.c | |||
@@ -231,6 +231,7 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
231 | if(ymax >= LCD_FBHEIGHT) | 231 | if(ymax >= LCD_FBHEIGHT) |
232 | ymax = LCD_FBHEIGHT-1; | 232 | ymax = LCD_FBHEIGHT-1; |
233 | 233 | ||
234 | void* (*fbaddr)(int x, int y) = FB_CURRENTVP_BUFFER->get_address_fn; | ||
234 | /* Copy specified rectange bitmap to hardware */ | 235 | /* Copy specified rectange bitmap to hardware */ |
235 | for (; y <= ymax; y++) | 236 | for (; y <= ymax; y++) |
236 | { | 237 | { |
@@ -238,6 +239,6 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
238 | lcd_write_command_ex(LCD_CNTL_COLUMN, x, -1); | 239 | lcd_write_command_ex(LCD_CNTL_COLUMN, x, -1); |
239 | 240 | ||
240 | lcd_write_command(LCD_CNTL_DATA_WRITE); | 241 | lcd_write_command(LCD_CNTL_DATA_WRITE); |
241 | lcd_write_data (FBADDR(x,y), width); | 242 | lcd_write_data (fbaddr(x,y), width); |
242 | } | 243 | } |
243 | } | 244 | } |