summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-h100-remote.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-02-22 00:20:28 +0000
committerJens Arnold <amiconn@rockbox.org>2006-02-22 00:20:28 +0000
commita875703e6e0e26cfd4dfd74d56a7d28feb37bdc5 (patch)
tree3c5117c9923a5cf19fb5f6209b8bbea5fd624db6 /firmware/drivers/lcd-h100-remote.c
parent18e097c8ffcc0fd98e4faa9bd536a319ba5ce536 (diff)
downloadrockbox-a875703e6e0e26cfd4dfd74d56a7d28feb37bdc5.tar.gz
rockbox-a875703e6e0e26cfd4dfd74d56a7d28feb37bdc5.zip
Slight optimisation for 1bit and 2bit (vp) LCD drivers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8772 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd-h100-remote.c')
-rw-r--r--firmware/drivers/lcd-h100-remote.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c
index 6bbe01a4c9..df735ca40d 100644
--- a/firmware/drivers/lcd-h100-remote.c
+++ b/firmware/drivers/lcd-h100-remote.c
@@ -916,9 +916,9 @@ void lcd_remote_fillrect(int x, int y, int width, int height)
916 int ny; 916 int ny;
917 unsigned char *dst, *dst_end; 917 unsigned char *dst, *dst_end;
918 unsigned mask, mask_bottom; 918 unsigned mask, mask_bottom;
919 unsigned bits = 0xFFu; 919 unsigned bits = 0;
920 lcd_blockfunc_type *bfunc; 920 lcd_blockfunc_type *bfunc;
921 bool fillopt; 921 bool fillopt = false;
922 922
923 /* nothing to draw? */ 923 /* nothing to draw? */
924 if ((width <= 0) || (height <= 0) || (x >= LCD_REMOTE_WIDTH) 924 if ((width <= 0) || (height <= 0) || (x >= LCD_REMOTE_WIDTH)
@@ -941,10 +941,21 @@ void lcd_remote_fillrect(int x, int y, int width, int height)
941 if (y + height > LCD_REMOTE_HEIGHT) 941 if (y + height > LCD_REMOTE_HEIGHT)
942 height = LCD_REMOTE_HEIGHT - y; 942 height = LCD_REMOTE_HEIGHT - y;
943 943
944 fillopt = (drawmode & DRMODE_INVERSEVID) ? 944 if (drawmode & DRMODE_INVERSEVID)
945 (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG); 945 {
946 if (fillopt &&(drawmode & DRMODE_INVERSEVID)) 946 if (drawmode & DRMODE_BG)
947 bits = 0; 947 {
948 fillopt = true;
949 }
950 }
951 else
952 {
953 if (drawmode & DRMODE_FG)
954 {
955 fillopt = true;
956 bits = 0xFFu;
957 }
958 }
948 bfunc = lcd_remote_blockfuncs[drawmode]; 959 bfunc = lcd_remote_blockfuncs[drawmode];
949 dst = &lcd_remote_framebuffer[y>>3][x]; 960 dst = &lcd_remote_framebuffer[y>>3][x];
950 ny = height - 1 + (y & 7); 961 ny = height - 1 + (y & 7);