[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/52] ui/vc: fold text_update_xy()
From: |
marcandre . lureau |
Subject: |
[PULL 14/52] ui/vc: fold text_update_xy() |
Date: |
Mon, 4 Sep 2023 15:52:11 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230830093843.3531473-15-marcandre.lureau@redhat.com>
---
ui/console.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/ui/console.c b/ui/console.c
index d1855f3fcf..405aedfcbd 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -425,14 +425,6 @@ static void text_console_resize(QemuConsole *s)
s->cells = cells;
}
-static inline void text_update_xy(QemuConsole *s, int x, int y)
-{
- s->text_x[0] = MIN(s->text_x[0], x);
- s->text_x[1] = MAX(s->text_x[1], x);
- s->text_y[0] = MIN(s->text_y[0], y);
- s->text_y[1] = MAX(s->text_y[1], y);
-}
-
static void invalidate_xy(QemuConsole *s, int x, int y)
{
if (!qemu_console_is_visible(s)) {
@@ -453,7 +445,10 @@ static void update_xy(QemuConsole *s, int x, int y)
TextCell *c;
int y1, y2;
- text_update_xy(s, x, y);
+ s->text_x[0] = MIN(s->text_x[0], x);
+ s->text_x[1] = MAX(s->text_x[1], x);
+ s->text_y[0] = MIN(s->text_y[0], y);
+ s->text_y[1] = MAX(s->text_y[1], y);
y1 = (s->y_base + y) % s->total_height;
y2 = y1 - s->y_displayed;
--
2.41.0
- [PULL 03/52] ui/qmp: move screendump to ui-qmp-cmds.c, (continued)
- [PULL 03/52] ui/qmp: move screendump to ui-qmp-cmds.c, marcandre . lureau, 2023/09/04
- [PULL 04/52] ui/vc: replace vc_chr_write() with generic qemu_chr_write(), marcandre . lureau, 2023/09/04
- [PULL 05/52] ui/vc: drop have_text, marcandre . lureau, 2023/09/04
- [PULL 06/52] ui/console: console_select() regardless of have_gfx, marcandre . lureau, 2023/09/04
- [PULL 07/52] ui/console: call dpy_gfx_update() regardless of have_gfx, marcandre . lureau, 2023/09/04
- [PULL 08/52] ui/console: drop have_gfx, marcandre . lureau, 2023/09/04
- [PULL 09/52] ui/console: get the DisplayState from new_console(), marcandre . lureau, 2023/09/04
- [PULL 10/52] ui/console: new_console() cannot fail, marcandre . lureau, 2023/09/04
- [PULL 11/52] ui/vc: VC always has a DisplayState now, marcandre . lureau, 2023/09/04
- [PULL 12/52] ui/vc: move VCChardev declaration at the top, marcandre . lureau, 2023/09/04
- [PULL 14/52] ui/vc: fold text_update_xy(),
marcandre . lureau <=
- [PULL 13/52] ui/vc: replace variable with static text attributes default, marcandre . lureau, 2023/09/04
- [PULL 15/52] ui/vc: pass VCCharDev to VC-specific functions, marcandre . lureau, 2023/09/04
- [PULL 16/52] ui/vc: move VCCharDev specific fields out of QemuConsole, marcandre . lureau, 2023/09/04
- [PULL 17/52] ui/console: use OBJECT_DEFINE_TYPE for QemuConsole, marcandre . lureau, 2023/09/04
- [PULL 18/52] ui/console: change new_console() to use object initialization, marcandre . lureau, 2023/09/04
- [PULL 20/52] ui/console: instantiate a specific console type, marcandre . lureau, 2023/09/04
- [PULL 19/52] ui/console: introduce different console objects, marcandre . lureau, 2023/09/04
- [PULL 21/52] ui/console: register the console from qemu_console_init(), marcandre . lureau, 2023/09/04
- [PULL 23/52] ui/console: specialize console_lookup_unused(), marcandre . lureau, 2023/09/04
- [PULL 26/52] ui/vc: move cursor_timer initialization to QemuTextConsole class, marcandre . lureau, 2023/09/04