All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] remove is_graphic_console from vga.c
Date: Thu, 05 Mar 2009 16:21:15 +0000	[thread overview]
Message-ID: <49AFFBFB.3080706@eu.citrix.com> (raw)

Hi all,
since vga_draw_graphic is only called by vga_hw_update when the console
associated with the graphic card is active, we don't need to check if
the current console is active using is_graphic_console.

I suspect I introduced these checks when the console switching mechanism
didn't work as it does now.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

---

diff --git a/hw/vga.c b/hw/vga.c
index 9be0480..60f9a68 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1629,18 +1629,14 @@ static void vga_draw_graphic(VGAState *s, int full_update)
 #else
         if (depth == 32) {
 #endif
-            if (is_graphic_console()) {
-                qemu_free_displaysurface(s->ds);
-                s->ds->surface = qemu_create_displaysurface_from(disp_width, height, depth,
-                                                               s->line_offset,
-                                                               s->vram_ptr + (s->start_addr * 4));
+            qemu_free_displaysurface(s->ds);
+            s->ds->surface = qemu_create_displaysurface_from(disp_width, height, depth,
+                    s->line_offset,
+                    s->vram_ptr + (s->start_addr * 4));
 #if defined(WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
-                s->ds->surface->pf = qemu_different_endianness_pixelformat(depth);
+            s->ds->surface->pf = qemu_different_endianness_pixelformat(depth);
 #endif
-                dpy_resize(s->ds);
-            } else {
-                qemu_console_resize(s->ds, disp_width, height);
-            }
+            dpy_resize(s->ds);
         } else {
             qemu_console_resize(s->ds, disp_width, height);
         }
@@ -1651,7 +1647,7 @@ static void vga_draw_graphic(VGAState *s, int full_update)
         s->last_line_offset = s->line_offset;
         s->last_depth = depth;
         full_update = 1;
-    } else if (is_graphic_console() && is_buffer_shared(s->ds->surface) &&
+    } else if (is_buffer_shared(s->ds->surface) &&
                (full_update || s->ds->surface->data != s->vram_ptr + (s->start_addr * 4))) {
         s->ds->surface->data = s->vram_ptr + (s->start_addr * 4);
         dpy_setdata(s->ds);

             reply	other threads:[~2009-03-05 16:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-05 16:21 Stefano Stabellini [this message]
2009-03-13 15:30 ` [Qemu-devel] [PATCH] remove is_graphic_console from vga.c Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49AFFBFB.3080706@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.