summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_engine.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2013-02-12 21:00:05 +1100
committerJonathan Gordon <rockbox@jdgordon.info>2013-02-12 21:01:13 +1100
commitaaf30651df27e0eb6fab876502fa1e6c084160bf (patch)
tree57601fbe5e54ed290bc6c966b059af801bd0d1bb /apps/gui/skin_engine/skin_engine.c
parent69228f92dbddc9940166c0d7af2b4c79d55f85e7 (diff)
downloadrockbox-aaf30651df27e0eb6fab876502fa1e6c084160bf.tar.gz
rockbox-aaf30651df27e0eb6fab876502fa1e6c084160bf.zip
skin_engine: Add a debug screen to display skin ram usage
Change-Id: Ida9c33211d9360ac88e30a2cf8df9f191bee8b45
Diffstat (limited to 'apps/gui/skin_engine/skin_engine.c')
-rw-r--r--apps/gui/skin_engine/skin_engine.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c
index 3c3f3221b4..4c113e5c68 100644
--- a/apps/gui/skin_engine/skin_engine.c
+++ b/apps/gui/skin_engine/skin_engine.c
@@ -65,11 +65,21 @@ static struct gui_skin_helper {
static struct gui_skin {
struct gui_wps gui_wps;
struct wps_data data;
+ struct skin_stats stats;
bool failsafe_loaded;
bool needs_full_update;
} skins[SKINNABLE_SCREENS_COUNT][NB_SCREENS];
+int skin_get_num_skins(void)
+{
+ return SKINNABLE_SCREENS_COUNT;
+}
+
+struct skin_stats *skin_get_stats(int number, int screen)
+{
+ return &skins[number][screen].stats;
+}
static void gui_skin_reset(struct gui_skin *skin)
{
@@ -167,12 +177,14 @@ void skin_load(enum skinnable_screens skin, enum screen_type screen,
skin_helpers[skin].preproccess(screen, &skins[skin][screen].data);
if (buf && *buf)
- loaded = skin_data_load(screen, &skins[skin][screen].data, buf, isfile);
+ loaded = skin_data_load(screen, &skins[skin][screen].data, buf, isfile,
+ &skins[skin][screen].stats);
if (!loaded && skin_helpers[skin].default_skin)
{
loaded = skin_data_load(screen, &skins[skin][screen].data,
- skin_helpers[skin].default_skin(screen), false);
+ skin_helpers[skin].default_skin(screen), false,
+ &skins[skin][screen].stats);
skins[skin][screen].failsafe_loaded = loaded;
}