Add _rect to {draw,fill}_viewport as suggested by Jonathan Gordon to reduce the chance to confuse it with update_viewport().

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28240 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2010-10-10 23:35:03 +00:00
parent 8a0152bd4a
commit 5462ef728f
9 changed files with 17 additions and 17 deletions

View File

@ -69,7 +69,7 @@ static void gui_buttonbar_draw_button(struct gui_buttonbar * buttonbar, int num)
vp.width = button_width-1;
vp.x = button_width * num;
display->set_viewport(&vp);
display->fill_viewport(NULL);
display->fill_viewport_rect(NULL);
if(buttonbar->caption[num][0] != 0)
{
display->getstringsize(buttonbar->caption[num], &fw, &fh);

View File

@ -163,7 +163,7 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
#endif
vp.drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID);
screen->fill_viewport(NULL);
screen->fill_viewport_rect(NULL);
#if LCD_DEPTH > 1
if (screen->depth > 1)
@ -174,7 +174,7 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
#endif
vp.drawmode = DRMODE_SOLID;
screen->draw_viewport(NULL);
screen->draw_viewport_rect(NULL);
/* prepare putting the text */
y = RECT_SPACING;

View File

@ -280,7 +280,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi
{
display->set_viewport(vp);
display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
display->fill_viewport(NULL);
display->fill_viewport_rect(NULL);
display->set_drawmode(DRMODE_SOLID);
if (bar->info.battery_state)

View File

@ -129,7 +129,7 @@ void touchbutton_draw(struct touchbutton *data, int num_buttons) {
}
/* Draw bounding box around the button location. */
lcd->draw_viewport(NULL);
lcd->draw_viewport_rect(NULL);
}
}
lcd->set_viewport(NULL); /* Go back to the default viewport */

View File

@ -162,8 +162,8 @@ struct screen screens[NB_SCREENS] =
.update_viewport_rect=&lcd_update_viewport_rect,
.fillrect=&lcd_fillrect,
.drawrect=&lcd_drawrect,
.draw_viewport=&lcd_draw_viewport,
.fill_viewport=&lcd_fill_viewport,
.draw_viewport_rect=&lcd_draw_viewport_rect,
.fill_viewport_rect=&lcd_fill_viewport_rect,
.drawpixel=&lcd_drawpixel,
.drawline=&lcd_drawline,
.vline=&lcd_vline,
@ -255,8 +255,8 @@ struct screen screens[NB_SCREENS] =
.update_viewport_rect=&lcd_remote_update_viewport_rect,
.fillrect=&lcd_remote_fillrect,
.drawrect=&lcd_remote_drawrect,
.draw_viewport=&lcd_remote_draw_viewport,
.fill_viewport=&lcd_remote_fill_viewport,
.draw_viewport_rect=&lcd_remote_draw_viewport_rect,
.fill_viewport_rect=&lcd_remote_fill_viewport_rect,
.drawpixel=&lcd_remote_drawpixel,
.drawline=&lcd_remote_drawline,
.vline=&lcd_remote_vline,

View File

@ -117,8 +117,8 @@ struct screen
void (*update_viewport_rect)(int x, int y, int width, int height);
void (*fillrect)(int x, int y, int width, int height);
void (*drawrect)(int x, int y, int width, int height);
void (*fill_viewport)(const struct viewport *vp);
void (*draw_viewport)(const struct viewport *vp);
void (*fill_viewport_rect)(const struct viewport *vp);
void (*draw_viewport_rect)(const struct viewport *vp);
void (*drawpixel)(int x, int y);
void (*drawline)(int x1, int y1, int x2, int y2);
void (*vline)(int x, int y1, int y2);

View File

@ -84,7 +84,7 @@ static void lcd_gradient_rect(int x1, int x2, int y, unsigned h,
/*
* draws the borders of the viewport, or of current_vp if vp == NULL
**/
void LCDFN(draw_viewport)(const struct viewport *vp)
void LCDFN(draw_viewport_rect)(const struct viewport *vp)
{
if (vp == NULL)
LCDFN(drawrect)(0, 0, current_vp->width, current_vp->height);
@ -95,7 +95,7 @@ void LCDFN(draw_viewport)(const struct viewport *vp)
/*
* fills the rectangle formed by vp or by current_vp if vp == NULL
**/
void LCDFN(fill_viewport)(const struct viewport *vp)
void LCDFN(fill_viewport_rect)(const struct viewport *vp)
{
if (vp == NULL)
LCDFN(fillrect)(0, 0, current_vp->width, current_vp->height);

View File

@ -178,8 +178,8 @@ extern void lcd_remote_hline(int x1, int x2, int y);
extern void lcd_remote_vline(int x, int y1, int y2);
extern void lcd_remote_drawrect(int x, int y, int width, int height);
extern void lcd_remote_fillrect(int x, int y, int width, int height);
extern void lcd_remote_draw_viewport(const struct viewport *vp);
extern void lcd_remote_fill_viewport(const struct viewport *vp);
extern void lcd_remote_draw_viewport_rect(const struct viewport *vp);
extern void lcd_remote_fill_viewport_rect(const struct viewport *vp);
extern void lcd_remote_bitmap_part(const fb_remote_data *src, int src_x,
int src_y, int stride, int x, int y,
int width, int height);

View File

@ -507,8 +507,8 @@ extern void lcd_hline(int x1, int x2, int y);
extern void lcd_vline(int x, int y1, int y2);
extern void lcd_drawrect(int x, int y, int width, int height);
extern void lcd_fillrect(int x, int y, int width, int height);
extern void lcd_draw_viewport(const struct viewport *vp);
extern void lcd_fill_viewport(const struct viewport *vp);
extern void lcd_draw_viewport_rect(const struct viewport *vp);
extern void lcd_fill_viewport_rect(const struct viewport *vp);
extern void lcd_bitmap_part(const fb_data *src, int src_x, int src_y,
int stride, int x, int y, int width, int height);
extern void lcd_bitmap(const fb_data *src, int x, int y, int width,