skin engine: Remove progressbar viewport field
Again, we don't need to store the viewport in the progressbar struct because it's known at render time. Change-Id: I12514ceaace7c897194b18929364340871ef4635
This commit is contained in:
parent
f242b0ec6c
commit
9368844ad1
5 changed files with 6 additions and 6 deletions
|
@ -158,10 +158,11 @@ void ab_draw_markers(struct screen * screen, int capacity,
|
|||
|
||||
#endif
|
||||
|
||||
void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb)
|
||||
void draw_progressbar(struct gui_wps *gwps, struct skin_viewport* skin_viewport,
|
||||
int line, struct progressbar *pb)
|
||||
{
|
||||
struct screen *display = gwps->display;
|
||||
struct viewport *vp = SKINOFFSETTOPTR(get_skin_buffer(gwps->data), pb->vp);
|
||||
struct viewport *vp = &skin_viewport->vp;
|
||||
struct wps_state *state = get_wps_state();
|
||||
struct mp3entry *id3 = state->id3;
|
||||
int x = pb->x, y = pb->y, width = pb->width, height = pb->height;
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
#define _SKIN_DISPLAY_H_
|
||||
|
||||
|
||||
void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb);
|
||||
void draw_progressbar(struct gui_wps *gwps, struct skin_viewport* skin_viewport,
|
||||
int line, struct progressbar *pb);
|
||||
void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *viewer);
|
||||
/* clears the area where the image was shown */
|
||||
void clear_image_pos(struct gui_wps *gwps, struct gui_img *img);
|
||||
|
|
|
@ -966,7 +966,6 @@ static int parse_progressbar_tag(struct skin_element* element,
|
|||
|
||||
if (!pb)
|
||||
return WPS_ERROR_INVALID_PARAM;
|
||||
pb->vp = PTRTOSKINOFFSET(skin_buffer, vp);
|
||||
pb->follow_lang_direction = follow_lang_direction > 0;
|
||||
pb->nofill = false;
|
||||
pb->noborder = false;
|
||||
|
|
|
@ -241,7 +241,7 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
|
|||
{
|
||||
struct progressbar *bar = (struct progressbar*)SKINOFFSETTOPTR(skin_buffer, token->value.data);
|
||||
if (do_refresh)
|
||||
draw_progressbar(gwps, info->line_number, bar);
|
||||
draw_progressbar(gwps, info->skin_vp, info->line_number, bar);
|
||||
}
|
||||
break;
|
||||
case SKIN_TOKEN_IMAGE_DISPLAY:
|
||||
|
|
|
@ -112,7 +112,6 @@ struct image_display {
|
|||
|
||||
struct progressbar {
|
||||
enum skin_token_type type;
|
||||
OFFSETTYPE(struct viewport *) vp;
|
||||
/* regular pb */
|
||||
short x;
|
||||
/* >=0: explicitly set in the tag -> y-coord within the viewport
|
||||
|
|
Loading…
Reference in a new issue