From feb5b15e9bf9292e3d4d82ea1e01ab3557fb1240 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 4 Jan 2008 23:42:38 +0000 Subject: All-new greyscale library, replacing the old one. Features: (1) Drawing/updating is faster than the old grayscale lib at full depth. (2) Always 129 shades instead of 2..33 shades. (3) No graininess caused by frequent updates (mpegplayer, doom, ...). (4) Needs less memory than the old grayscale lib at full depth. * The tradeoff is slightly higher CPU load in the ISR (frames are calculated 'live') and an extra function in the core. * Ported all plugins which used the graylib to use the new one. * Some slight optimisations for archos and H1x0 LCD update. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15998 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/coldfire/iriver/h100/lcd-h100.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'firmware/target/coldfire/iriver/h100/lcd-h100.c') diff --git a/firmware/target/coldfire/iriver/h100/lcd-h100.c b/firmware/target/coldfire/iriver/h100/lcd-h100.c index a721273384..c17de952c3 100644 --- a/firmware/target/coldfire/iriver/h100/lcd-h100.c +++ b/firmware/target/coldfire/iriver/h100/lcd-h100.c @@ -180,6 +180,21 @@ void lcd_blit(const unsigned char* data, int x, int by, int width, } } +/* Performance function that works with an external buffer + note that by and bheight are in 4-pixel units! */ +void lcd_grey_phase_blit(const struct grey_data *data, int x, int by, + int width, int bheight, int stride) +{ + stride <<= 2; /* 4 pixels per block */ + while (bheight--) + { + lcd_write_command_ex(LCD_CNTL_PAGE, by++, -1); + lcd_write_command_ex(LCD_CNTL_COLUMN, x, -1); + lcd_write_command(LCD_CNTL_DATA_WRITE); + lcd_grey_data(data, width); + data += stride; + } +} /* Update the display. This must be called after all other LCD functions that change the display. */ -- cgit v1.2.3