diff mbox series

[07/67] ui/console: call dpy_gfx_update() regardless of have_gfx

Message ID 20230830093843.3531473-8-marcandre.lureau@redhat.com
State New
Headers show
Series Make pixman an optional dependency | expand

Commit Message

Marc-André Lureau Aug. 30, 2023, 9:37 a.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

The function will handle the case when no listeners are gfx, without
extra meaningful cost.

This allows to get rid of DisplayState dependency in VC implementation.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 ui/console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel P. Berrangé Aug. 30, 2023, 11:06 a.m. UTC | #1
On Wed, Aug 30, 2023 at 01:37:41PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> The function will handle the case when no listeners are gfx, without
> extra meaningful cost.
> 
> This allows to get rid of DisplayState dependency in VC implementation.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  ui/console.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
diff mbox series

Patch

diff --git a/ui/console.c b/ui/console.c
index 14717a6f4d..2bc4c153de 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1087,7 +1087,7 @@  static int vc_chr_write(Chardev *chr, const uint8_t *buf, int len)
         console_putchar(s, buf[i]);
     }
     console_show_cursor(s, 1);
-    if (s->ds->have_gfx && s->update_x0 < s->update_x1) {
+    if (s->update_x0 < s->update_x1) {
         dpy_gfx_update(s, s->update_x0, s->update_y0,
                        s->update_x1 - s->update_x0,
                        s->update_y1 - s->update_y0);