summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/grey.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-01-10 22:51:33 +0000
committerJens Arnold <amiconn@rockbox.org>2008-01-10 22:51:33 +0000
commitdf5c3e15e8d04d519b7870fe809c15053783c14c (patch)
tree984d43fcc9756a39b693976a91f3b3e657cef361 /apps/plugins/lib/grey.h
parent12cc3cc47cf4820a323fabf9815076705b9dd8fb (diff)
downloadrockbox-df5c3e15e8d04d519b7870fe809c15053783c14c.tar.gz
rockbox-df5c3e15e8d04d519b7870fe809c15053783c14c.zip
Greyscale library: * Introduced some extra macros dealing with block size, allowing to write some parts with less #ifdefing. * Optimised grey_update_rect() for horizontally packed LCDs, and unbuffered scrolling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16050 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/grey.h')
-rw-r--r--apps/plugins/lib/grey.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/plugins/lib/grey.h b/apps/plugins/lib/grey.h
index 9a3bd7d3f8..5bef88a89a 100644
--- a/apps/plugins/lib/grey.h
+++ b/apps/plugins/lib/grey.h
@@ -121,15 +121,18 @@ void grey_ub_scroll_down(int count);
121#endif 121#endif
122 122
123#if LCD_PIXELFORMAT == HORIZONTAL_PACKING 123#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
124#define _GREY_X_ADVANCE 1 124#define _GREY_BSHIFT 0
125#else 125#else
126#if LCD_DEPTH == 1 126#if LCD_DEPTH == 1
127#define _GREY_X_ADVANCE 8 127#define _GREY_BSHIFT 3
128#elif LCD_DEPTH == 2 128#elif LCD_DEPTH == 2
129#define _GREY_X_ADVANCE 4 129#define _GREY_BSHIFT 2
130#endif 130#endif
131#endif /* LCD_PIXELFORMAT */ 131#endif /* LCD_PIXELFORMAT */
132 132
133#define _GREY_BSIZE (1<<_GREY_BSHIFT)
134#define _GREY_BMASK (_GREY_BSIZE-1)
135
133/* The greyscale buffer management structure */ 136/* The greyscale buffer management structure */
134struct _grey_info 137struct _grey_info
135{ 138{