From e4921d6ab5f7bf8999592faa0a9179bb40f11ebf Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sat, 24 Oct 2009 16:01:53 +0000 Subject: 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 --- firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c') diff --git a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c index 21ecdf8afa..c22382f19c 100644 --- a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c +++ b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c @@ -405,12 +405,13 @@ void lcd_update_rect(int x, int y, int width, int height) ptr = &lcd_framebuffer[y][x]; + height = ymax - y - 1; /* fix height */ do { lcd_write_data(ptr, width); ptr += LCD_WIDTH; } - while (++y <= ymax); + while (--height > 0); lcd_busy = false; } -- cgit v1.2.3