summaryrefslogtreecommitdiff
path: root/apps/gui/viewport.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2009-06-07 21:27:05 +0000
committerJens Arnold <amiconn@rockbox.org>2009-06-07 21:27:05 +0000
commit1d6df54df27cb41c02226678a2c8f9feddd1a1e0 (patch)
tree5fdc6dd98ac0208f5c3351b062063af6914cbefb /apps/gui/viewport.h
parentc3182ec333982e961d3babfbdb1125fd5bac7fb8 (diff)
downloadrockbox-1d6df54df27cb41c02226678a2c8f9feddd1a1e0.tar.gz
rockbox-1d6df54df27cb41c02226678a2c8f9feddd1a1e0.zip
Convert a number of places in core and plugins to use the BIT_N() macro instead of 1<<n. Speeds up things on SH1, and also reduces core binsize. Most notable speedups: 1 bit lcd driver: drawpixel +20%, drawline + 27%, hline +5%; jpeg viewer: +8% for 1/8 scaling. Other targets are unaffected.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21205 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/viewport.h')
-rw-r--r--apps/gui/viewport.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/gui/viewport.h b/apps/gui/viewport.h
index 76ed327f69..acc9758ee3 100644
--- a/apps/gui/viewport.h
+++ b/apps/gui/viewport.h
@@ -22,6 +22,7 @@
22 22
23#include "config.h" 23#include "config.h"
24#include "lcd.h" 24#include "lcd.h"
25#include "system.h"
25#include "screen_access.h" 26#include "screen_access.h"
26 27
27/* return the number of text lines in the vp viewport */ 28/* return the number of text lines in the vp viewport */
@@ -58,8 +59,8 @@ void viewport_set_defaults(struct viewport *vp, enum screen_type screen);
58 * SB "displaying rules". 59 * SB "displaying rules".
59 */ 60 */
60#define VP_SB_HIDE_ALL 0 61#define VP_SB_HIDE_ALL 0
61#define VP_SB_ONSCREEN(screen) (1u<<screen) 62#define VP_SB_ONSCREEN(screen) BIT_N(screen)
62#define VP_SB_IGNORE_SETTING(screen) (1u<<(4+screen)) 63#define VP_SB_IGNORE_SETTING(screen) BIT_N(4+screen)
63#define VP_SB_ALLSCREENS (VP_SB_ONSCREEN(0)|VP_SB_ONSCREEN(1)) 64#define VP_SB_ALLSCREENS (VP_SB_ONSCREEN(0)|VP_SB_ONSCREEN(1))
64int viewportmanager_set_statusbar(int enabled); 65int viewportmanager_set_statusbar(int enabled);
65 66