From 576908d36a58d51ee880791418a32cef25b49aba Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 29 Jun 2005 01:39:50 +0000 Subject: Third part of graphics api rework. Some small but effective optimisations. Ported remote lcd driver to new api. Preparations for including the low-level functions in the plugin api. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6907 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/lcd.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'firmware/export/lcd.h') diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 6a6a8e8697..77e79799f8 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -122,9 +122,9 @@ extern void lcd_jump_scroll_delay(int ms); #define DRMODE_SOLID 3 #define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */ -#define DRAW_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] |= (1<<((y)&7)) -#define CLEAR_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] &= ~(1<<((y)&7)) -#define INVERT_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] ^= (1<<((y)&7)) +#define DRAW_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] |= (1<<((y)&7)) +#define CLEAR_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] &= ~(1<<((y)&7)) +#define INVERT_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] ^= (1<<((y)&7)) typedef void lcd_pixelfunc_type(int x, int y); /* for b&w */ typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits); @@ -144,6 +144,10 @@ extern int lcd_getymargin(void); extern void lcd_setfont(int font); extern int lcd_getstringsize(const unsigned char *str, int *w, int *h); +/* low level drawing function pointer arrays */ +extern lcd_pixelfunc_type* lcd_pixelfuncs[8]; +extern lcd_blockfunc_type* lcd_blockfuncs[8]; + extern void lcd_drawpixel(int x, int y); extern void lcd_drawline(int x1, int y1, int x2, int y2); extern void lcd_hline(int x1, int x2, int y); -- cgit v1.2.3