FS#4817 - Remove duplicated scrolling code in the LCD drivers.

Attached to Project: Rockbox
Opened by Fredrik Öhrn (ohrn) - Saturday, 11 March 2006, 17:03 GMT
Last edited by Andrew Mahone (Unhelpful) - Thursday, 13 August 2009, 08:05 GMT
Task Type Patches
Category Drivers
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch merges the scrolling code from all the bitmap LCD drivers (except the H100 remote) into a single file.
The copyright notice needs to be fixed, I was unable to figure out from whom the scrolling code actually originated.
Closed by  Andrew Mahone (Unhelpful)
Thursday, 13 August 2009, 08:05 GMT
Reason for closing:  Accepted
Additional comments about closing:  Committed as r22289.
Comment by pillo (pillo79) - Saturday, 11 March 2006, 18:08 GMT
It seems you forgot to include in the patch the scrolling.c file you just created. This is probably because you used "cvs diff" on a tree with non-yet-added cvs files (see first line of your .diff ;-)
Comment by Fredrik Öhrn (ohrn) - Saturday, 11 March 2006, 18:23 GMT
Doh! I spent ages fighting with cvs over that misfeature and then I manage to upload the wrong file.
Here's the correct diff with scrolling.c included.
Comment by Fredrik Öhrn (ohrn) - Monday, 13 March 2006, 09:45 GMT
OK, I managed to leave some junk in a function declaration. Here's a new patch.
Comment by Jonathan Gordon (jdgordon) - Tuesday, 31 July 2007, 13:26 GMT
quick attempt to merge the bits of the lcd drivers which wernt done last week.
untested because stupid gcc complains about no sysfont.h with this, hopefully someone else has more luck
Comment by Peter D'Hoye (petur) - Thursday, 02 August 2007, 21:14 GMT
Comment by Jonathan Gordon (jdgordon) - Saturday, 11 August 2007, 14:56 GMT
forgot about this one...

something causes sysfont.h to not be created...
Comment by Barry Wardell (barrywardell) - Saturday, 11 August 2007, 15:29 GMT
The problem isn't really with sysfont.h. The problem is your change in firmware/SOURCES. The added line should be 'drivers/lcd-generic.c'. For some reason, whenever a file from SOURCES doesn't exist, we get an error about sysont.h not being created instead of an error about the missing file.

I made the change to firmware/SOURCES, but there are a load of errors in compiling lcd-generic.c so I didn't go any further with testing it.

Edit: I've opened a task for the sysfont.h problem and added it as a related task here.
Comment by Jonathan Gordon (jdgordon) - Sunday, 12 August 2007, 00:38 GMT
doh, thanks Barry.

here is a partial sync.. it now compiles fine on 16 bit non-lcd-remote targets.. if this is wanted the rest of the lcd targets can be fixed up also
Comment by Andrew Mahone (Unhelpful) - Saturday, 18 July 2009, 10:23 GMT
This is more of a rewrite than a resync, moving pretty much all of the text drawing code into a new lcd-bitmap-common.c, merging the styled text draw code used by puts_style_offset and puts_scroll_style_offset, and merging lcd_gradient_rect and lcd_gradient_rect_scroll. There are binsize savings on the order of 500-600B on color targets, with smaller or no improvement on greyscale targets. I also have a version in a branch which avoids including lcd-bitmap-common.c, but this is more invasive (because the viewports must be made non-static, and therefore must have unique names between main and remote) and causes binsize increase on some targets compared to this version (probably because of long calls).
EDIT: new diff, previous one missed the new file
Comment by Andrew Mahone (Unhelpful) - Friday, 24 July 2009, 04:49 GMT
Updated, mostly just line-length fixes