diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-02-02 19:35:51 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-02-02 19:35:51 +0000 |
commit | 32326ef10d92ffcbf3167bddb0c67e02ed0bd591 (patch) | |
tree | 7d405feca09ec816e18b919029804f4f7dfdb249 /firmware/drivers/lcd-h100.c | |
parent | 20debbfa5d2390ea54ff07164f93495766f5828b (diff) | |
download | rockbox-32326ef10d92ffcbf3167bddb0c67e02ed0bd591.tar.gz rockbox-32326ef10d92ffcbf3167bddb0c67e02ed0bd591.zip |
* Changed implementation of inverse bar: Instead of complementing all pixels after drawing the text, the text is drawn in inversevid mode. This is faster, and will be more readable when backdrop image support gets added. Appearance on non-colour targets doesn't change. * Speedup of the scroll thread.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8532 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd-h100.c')
-rw-r--r-- | firmware/drivers/lcd-h100.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c index 685984522d..ef32078afb 100644 --- a/firmware/drivers/lcd-h100.c +++ b/firmware/drivers/lcd-h100.c | |||
@@ -845,7 +845,7 @@ void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
845 | unsigned mask_col = mask; | 845 | unsigned mask_col = mask; |
846 | unsigned data = 0; | 846 | unsigned data = 0; |
847 | 847 | ||
848 | for (y = ny; y >= 8; y -= 8) | 848 | for (y = ny; y >= 8; y -= 8) |
849 | { | 849 | { |
850 | data |= *src_col << shift; | 850 | data |= *src_col << shift; |
851 | 851 | ||
@@ -1090,14 +1090,11 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, | |||
1090 | lcd_getstringsize(str, &w, &h); | 1090 | lcd_getstringsize(str, &w, &h); |
1091 | xpos = xmargin + x*w / utf8length((char *)str); | 1091 | xpos = xmargin + x*w / utf8length((char *)str); |
1092 | ypos = ymargin + y*h; | 1092 | ypos = ymargin + y*h; |
1093 | drawmode = (style & STYLE_INVERT) ? | ||
1094 | (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; | ||
1093 | lcd_putsxyofs(xpos, ypos, offset, str); | 1095 | lcd_putsxyofs(xpos, ypos, offset, str); |
1094 | drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); | 1096 | drawmode ^= DRMODE_INVERSEVID; |
1095 | lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h); | 1097 | lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h); |
1096 | if (style & STYLE_INVERT) | ||
1097 | { | ||
1098 | drawmode = DRMODE_COMPLEMENT; | ||
1099 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, h); | ||
1100 | } | ||
1101 | drawmode = lastmode; | 1098 | drawmode = lastmode; |
1102 | } | 1099 | } |
1103 | 1100 | ||
@@ -1266,15 +1263,9 @@ static void scroll_thread(void) | |||
1266 | } | 1263 | } |
1267 | 1264 | ||
1268 | lastmode = drawmode; | 1265 | lastmode = drawmode; |
1269 | drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); | 1266 | drawmode = s->invert ? |
1270 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1267 | (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; |
1271 | drawmode = DRMODE_SOLID; | 1268 | lcd_putsxyofs(xpos, ypos, s->offset, s->line); |
1272 | lcd_putsxyofs(xpos, ypos, s->offset, (unsigned char *)s->line); | ||
1273 | if (s->invert) | ||
1274 | { | ||
1275 | drawmode = DRMODE_COMPLEMENT; | ||
1276 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | ||
1277 | } | ||
1278 | drawmode = lastmode; | 1269 | drawmode = lastmode; |
1279 | lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1270 | lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height); |
1280 | } | 1271 | } |