diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-13 15:02:18 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-13 15:02:18 +0000 |
commit | b8c18e4c901edae8cc14c07baa36f852be1f1ad0 (patch) | |
tree | d1a8b735b1396ab5391514333084b0b58b71bb6d /hw/vga.c | |
parent | 7b5d76dae31881d3cdb6f748ad4e84ddd7b66f3e (diff) |
remove is_graphic_console from vga.c (Stefano Stabellini)
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>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6840 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/vga.c')
-rw-r--r-- | hw/vga.c | 18 |
1 files changed, 7 insertions, 11 deletions
@@ -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); |