[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/67] ui/vc: fold text_update_xy()
From: |
marcandre . lureau |
Subject: |
[PATCH 14/67] ui/vc: fold text_update_xy() |
Date: |
Wed, 30 Aug 2023 13:37:48 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <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 9d8406f2a2..e96f154cc0 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
- Re: [PATCH 07/67] ui/console: call dpy_gfx_update() regardless of have_gfx, (continued)
- [PATCH 08/67] ui/console: drop have_gfx, marcandre . lureau, 2023/08/30
- [PATCH 09/67] ui/console: get the DisplayState from new_console(), marcandre . lureau, 2023/08/30
- [PATCH 10/67] ui/console: new_console() cannot fail, marcandre . lureau, 2023/08/30
- [PATCH 11/67] ui/vc: VC always has a DisplayState now, marcandre . lureau, 2023/08/30
- [PATCH 12/67] ui/vc: move VCChardev declaration at the top, marcandre . lureau, 2023/08/30
- [PATCH 13/67] ui/vc: replace variable with static text attributes default, marcandre . lureau, 2023/08/30
- [PATCH 14/67] ui/vc: fold text_update_xy(),
marcandre . lureau <=
- [PATCH 15/67] ui/vc: pass VCCharDev to VC-specific functions, marcandre . lureau, 2023/08/30
- [PATCH 16/67] ui/vc: move VCCharDev specific fields out of QemuConsole, marcandre . lureau, 2023/08/30
- [PATCH 17/67] ui/console: use OBJECT_DEFINE_TYPE for QemuConsole, marcandre . lureau, 2023/08/30
- [PATCH 18/67] ui/console: change new_console() to use object initialization, marcandre . lureau, 2023/08/30
- [PATCH 20/67] ui/console: instantiate a specific console type, marcandre . lureau, 2023/08/30
- [PATCH 19/67] ui/console: introduce different console objects, marcandre . lureau, 2023/08/30
- [PATCH 21/67] ui/console: register the console from qemu_console_init(), marcandre . lureau, 2023/08/30
- [PATCH 22/67] ui/console: remove new_console(), marcandre . lureau, 2023/08/30