dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: FS#4817 comments request

FS#4817 comments request

From: Andrew Mahone <>
Date: Tue, 11 Aug 2009 21:18:18 -0400

I've done a bit of a rewrite on this old task to unify more of the LCD
driver code. Right now, it covers nearly all of the text drawing code,
and also unifies the code for drawing styled text, which is currently
duplicated between scroll_fn and puts_style_offset, and unifies the
gradient-drawing code on color targets.

The merged code is still quite readable, with a few color-LCD #ifdefs
because of the extra styles available on color. The merged code is in
a new file, firmware/drivers/lcd-bitmap-common.c, which is included by
each bitmap LCD driver. Including it solves two problems: if it is
compiled separately, long calls cost some binsize and speed on many
targets (it's actually larger than SVN on coldfire and arm greyscale
targets), and the current viewport in the LCD driver must be made
non-static so that the lcd-bitmap-common.c functions may access it,
which can lead to a name clash on targets with a remote. The clash can
be solved by adding lcd_ and remote_lcd_ prefixes to the variable, a
very invasive change, or by making only the main-LCD current viewport
non-static. I didn't consider either of these much better than a
C-file include, which exist elsewhere in RB when they're a good
solution, but if that's the only objection raised I can change that

If there aren't any major objections, I'll commit it in a day or so.
It's worked correctly for me on greyscale, mono, and color sims and on
my two color targets as well.

Andrew Mahone
andrew DOT mahone AT gmail DOT com
Q: How many voters does it take to change a lightbulb?
A: None - if voting could change anything they'd make it illegal
Received on 2009-08-12

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy