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-e200v2/lcd-e200v2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c') diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c index 7c3ccc2c0b..24fc4eae57 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c +++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c @@ -556,12 +556,15 @@ void lcd_update_rect(int x, int y, int width, int height) ptr = (fb_data*)&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; } /* lcd_update_rect */ -- cgit v1.2.3