summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-05-20 15:27:17 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-05-20 15:27:17 +0000
commitf531adc3121704d3c3a8ce4b580551aa8691236c (patch)
tree4435b96d9d5998641a92955caf6df37c73faeeb0
parentb8176a6761ff0e6f681c3a1ffb6351b40b24cd20 (diff)
pass pointers around instead of coping whole structs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26197 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/scrollbar.c12
-rw-r--r--apps/gui/scrollbar.h2
-rw-r--r--apps/gui/skin_engine/skin_display.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c
index 67bf60de3f..317c55cdc7 100644
--- a/apps/gui/scrollbar.c
+++ b/apps/gui/scrollbar.c
@@ -170,7 +170,7 @@ void gui_scrollbar_draw(struct screen * screen, int x, int y,
screen->fillrect(inner_x, inner_y, inner_wd, inner_ht);
}
-void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap bm, int x, int y,
+void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap *bm, int x, int y,
int width, int height, int items,
int min_shown, int max_shown,
unsigned flags)
@@ -202,15 +202,15 @@ void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap bm, int x,
}
#if LCD_DEPTH > 1
- if (bm.format == FORMAT_MONO)
+ if (bm->format == FORMAT_MONO)
#endif
- screen->mono_bitmap_part(bm.data, 0, 0,
- bm.width, x, y, width, height);
+ screen->mono_bitmap_part(bm->data, 0, 0,
+ bm->width, x, y, width, height);
#if LCD_DEPTH > 1
else
- screen->transparent_bitmap_part((fb_data *)bm.data, 0, 0,
+ screen->transparent_bitmap_part((fb_data *)bm->data, 0, 0,
STRIDE(screen->screen_type,
- bm.width, bm.height),
+ bm->width, bm->height),
x, y, width, height);
#endif
}
diff --git a/apps/gui/scrollbar.h b/apps/gui/scrollbar.h
index 3c5b35eee9..03e1e6ec43 100644
--- a/apps/gui/scrollbar.h
+++ b/apps/gui/scrollbar.h
@@ -53,7 +53,7 @@ extern void gui_scrollbar_draw(struct screen * screen, int x, int y,
int width, int height, int items,
int min_shown, int max_shown,
unsigned flags);
-extern void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap bm,
+extern void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap *bm,
int x, int y,
int width, int height, int items,
int min_shown, int max_shown,
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index a687e84f1c..08f363d165 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -178,7 +178,7 @@ static void draw_progressbar(struct gui_wps *gwps,
}
if (pb->have_bitmap_pb)
- gui_bitmap_scrollbar_draw(display, pb->bm,
+ gui_bitmap_scrollbar_draw(display, &pb->bm,
pb->x, y, pb->width, pb->bm.height,
length, 0, elapsed, HORIZONTAL);
else