From c1d27d105c3333b5df67c97d88885efa2a49bc9a Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 1 Jun 2009 21:28:03 +0000 Subject: Speed up mono bitmap drawing on horizontally packed greyscale targets (greyscale iPods). Average speedup is 80% on PP5002, and 55% on PP502x. * Simplify mono bitmap drawing in the 16 bit driver and the greylib a bit, also giving a slight speedup (3% on PP502x, 1.5% on coldfire). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21163 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/grey_draw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/plugins/lib') diff --git a/apps/plugins/lib/grey_draw.c b/apps/plugins/lib/grey_draw.c index c1e6376cfe..3b81694426 100644 --- a/apps/plugins/lib/grey_draw.c +++ b/apps/plugins/lib/grey_draw.c @@ -447,6 +447,7 @@ void grey_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, src_end = src + width; dwidth = _grey_info.width; dst = &_grey_info.buffer[_GREY_MULUQ(dwidth, y) + x]; + dst_end = dst + _GREY_MULUQ(dwidth, height); if (drmode & DRMODE_INVERSEVID) { @@ -461,8 +462,6 @@ void grey_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, unsigned data = (*src_col ^ dmask) >> src_y; int fg, bg; - dst_end = dst_col + _GREY_MULUQ(dwidth, height); - #define UPDATE_SRC do { \ data >>= 1; \ if (data == 0x001) { \ -- cgit v1.2.3