[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 38/52] ui/console: assert(surface) where appropriate
From: |
marcandre . lureau |
Subject: |
[PULL 38/52] ui/console: assert(surface) where appropriate |
Date: |
Mon, 4 Sep 2023 15:52:35 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
The QemuTextConsole code paths assume a surface is being used as
scanout, let's make this more explicit.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230830093843.3531473-39-marcandre.lureau@redhat.com>
---
ui/console.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ui/console.c b/ui/console.c
index a157a5b31c..04ec2d2488 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -339,6 +339,7 @@ static void qemu_console_fill_rect(QemuConsole *con, int
posx, int posy,
.x = posx, .y = posy, .width = width, .height = height
};
+ assert(surface);
pixman_image_fill_rectangles(PIXMAN_OP_SRC, surface->image,
&color, 1, &rect);
}
@@ -349,6 +350,7 @@ static void qemu_console_bitblt(QemuConsole *con,
{
DisplaySurface *surface = qemu_console_surface(con);
+ assert(surface);
pixman_image_composite(PIXMAN_OP_SRC,
surface->image, NULL, surface->image,
xs, ys, 0, 0, xd, yd, w, h);
@@ -392,6 +394,7 @@ static void vga_putcharxy(QemuConsole *s, int x, int y, int
ch,
DisplaySurface *surface = qemu_console_surface(s);
pixman_color_t fgcol, bgcol;
+ assert(surface);
if (t_attrib->invers) {
bgcol = color_table_rgb[t_attrib->bold][t_attrib->fgcol];
fgcol = color_table_rgb[t_attrib->bold][t_attrib->bgcol];
@@ -519,6 +522,7 @@ static void console_refresh(QemuTextConsole *s)
TextCell *c;
int x, y, y1;
+ assert(surface);
s->text_x[0] = 0;
s->text_y[0] = 0;
s->text_x[1] = s->width - 1;
--
2.41.0
- [PULL 25/52] ui/console: allocate ui_timer in QemuConsole, (continued)
- [PULL 25/52] ui/console: allocate ui_timer in QemuConsole, marcandre . lureau, 2023/09/04
- [PULL 29/52] ui/console: move graphic fields to QemuGraphicConsole, marcandre . lureau, 2023/09/04
- [PULL 30/52] ui/vc: fold text_console_do_init() in vc_chr_open(), marcandre . lureau, 2023/09/04
- [PULL 31/52] ui/vc: move some text console initialization to qom handlers, marcandre . lureau, 2023/09/04
- [PULL 32/52] ui/console: simplify getting active_console size, marcandre . lureau, 2023/09/04
- [PULL 35/52] ui/console: declare console types in console.h, marcandre . lureau, 2023/09/04
- [PULL 37/52] ui/console: rename vga_ functions with qemu_console_, marcandre . lureau, 2023/09/04
- [PULL 33/52] ui/console: remove need for g_width/g_height, marcandre . lureau, 2023/09/04
- [PULL 34/52] ui/vc: use common text console surface creation, marcandre . lureau, 2023/09/04
- [PULL 36/52] ui/console: use QEMU_PIXMAN_COLOR helpers, marcandre . lureau, 2023/09/04
- [PULL 38/52] ui/console: assert(surface) where appropriate,
marcandre . lureau <=
- [PULL 39/52] ui/console: fold text_console_update_cursor_timer, marcandre . lureau, 2023/09/04
- [PULL 40/52] ui/vc: skip text console resize when possible, marcandre . lureau, 2023/09/04
- [PULL 41/52] ui/console: minor stylistic changes, marcandre . lureau, 2023/09/04
- [PULL 43/52] ui/vc: do not parse VC-specific options in Spice and GTK, marcandre . lureau, 2023/09/04
- [PULL 42/52] ui/vc: move text console invalidate in helper, marcandre . lureau, 2023/09/04
- [PULL 44/52] ui/vc: change the argument for QemuTextConsole, marcandre . lureau, 2023/09/04
- [PULL 45/52] ui/spice-display: Avoid dynamic stack allocation, marcandre . lureau, 2023/09/04
- [PULL 46/52] ui/vnc-enc-hextile: Use static rather than dynamic length stack array, marcandre . lureau, 2023/09/04
- [PULL 47/52] ui/vnc-enc-tight: Avoid dynamic stack allocation, marcandre . lureau, 2023/09/04
- [PULL 48/52] ui/dbus: Properly dispose touch/mouse dbus objects, marcandre . lureau, 2023/09/04