Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ui/console: rename vga_ functions with qemu_console_
They are not specific to VGA. Let's use the object type name as prefix
instead, to avoid confusion.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230830093843.3531473-38-marcandre.lureau@redhat.com>
  • Loading branch information
elmarco committed Sep 4, 2023
1 parent 1ece677 commit b704a8c
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions ui/console.c
Expand Up @@ -331,9 +331,8 @@ void graphic_hw_text_update(QemuConsole *con, console_ch_t *chardata)
}
}

static void vga_fill_rect(QemuConsole *con,
int posx, int posy, int width, int height,
pixman_color_t color)
static void qemu_console_fill_rect(QemuConsole *con, int posx, int posy,
int width, int height, pixman_color_t color)
{
DisplaySurface *surface = qemu_console_surface(con);
pixman_rectangle16_t rect = {
Expand All @@ -345,8 +344,8 @@ static void vga_fill_rect(QemuConsole *con,
}

/* copy from (xs, ys) to (xd, yd) a rectangle of size (w, h) */
static void vga_bitblt(QemuConsole *con,
int xs, int ys, int xd, int yd, int w, int h)
static void qemu_console_bitblt(QemuConsole *con,
int xs, int ys, int xd, int yd, int w, int h)
{
DisplaySurface *surface = qemu_console_surface(con);

Expand Down Expand Up @@ -526,8 +525,8 @@ static void console_refresh(QemuTextConsole *s)
s->text_y[1] = s->height - 1;
s->cursor_invalidate = 1;

vga_fill_rect(QEMU_CONSOLE(s), 0, 0, surface_width(surface), surface_height(surface),
color_table_rgb[0][QEMU_COLOR_BLACK]);
qemu_console_fill_rect(QEMU_CONSOLE(s), 0, 0, surface_width(surface), surface_height(surface),
color_table_rgb[0][QEMU_COLOR_BLACK]);
y1 = s->y_displayed;
for (y = 0; y < s->height; y++) {
c = s->cells + y1 * s->width;
Expand Down Expand Up @@ -605,12 +604,12 @@ static void vc_put_lf(VCChardev *vc)
s->text_x[1] = s->width - 1;
s->text_y[1] = s->height - 1;

vga_bitblt(QEMU_CONSOLE(s), 0, FONT_HEIGHT, 0, 0,
s->width * FONT_WIDTH,
(s->height - 1) * FONT_HEIGHT);
vga_fill_rect(QEMU_CONSOLE(s), 0, (s->height - 1) * FONT_HEIGHT,
s->width * FONT_WIDTH, FONT_HEIGHT,
color_table_rgb[0][TEXT_ATTRIBUTES_DEFAULT.bgcol]);
qemu_console_bitblt(QEMU_CONSOLE(s), 0, FONT_HEIGHT, 0, 0,
s->width * FONT_WIDTH,
(s->height - 1) * FONT_HEIGHT);
qemu_console_fill_rect(QEMU_CONSOLE(s), 0, (s->height - 1) * FONT_HEIGHT,
s->width * FONT_WIDTH, FONT_HEIGHT,
color_table_rgb[0][TEXT_ATTRIBUTES_DEFAULT.bgcol]);
s->update_x0 = 0;
s->update_y0 = 0;
s->update_x1 = s->width * FONT_WIDTH;
Expand Down

0 comments on commit b704a8c

Please sign in to comment.