Commit b8c18e4c901edae8cc14c07baa36f852be1f1ad0
1 parent
7b5d76da
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
Showing
1 changed file
with
7 additions
and
11 deletions
hw/vga.c
... | ... | @@ -1629,18 +1629,14 @@ static void vga_draw_graphic(VGAState *s, int full_update) |
1629 | 1629 | #else |
1630 | 1630 | if (depth == 32) { |
1631 | 1631 | #endif |
1632 | - if (is_graphic_console()) { | |
1633 | - qemu_free_displaysurface(s->ds); | |
1634 | - s->ds->surface = qemu_create_displaysurface_from(disp_width, height, depth, | |
1635 | - s->line_offset, | |
1636 | - s->vram_ptr + (s->start_addr * 4)); | |
1632 | + qemu_free_displaysurface(s->ds); | |
1633 | + s->ds->surface = qemu_create_displaysurface_from(disp_width, height, depth, | |
1634 | + s->line_offset, | |
1635 | + s->vram_ptr + (s->start_addr * 4)); | |
1637 | 1636 | #if defined(WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN) |
1638 | - s->ds->surface->pf = qemu_different_endianness_pixelformat(depth); | |
1637 | + s->ds->surface->pf = qemu_different_endianness_pixelformat(depth); | |
1639 | 1638 | #endif |
1640 | - dpy_resize(s->ds); | |
1641 | - } else { | |
1642 | - qemu_console_resize(s->ds, disp_width, height); | |
1643 | - } | |
1639 | + dpy_resize(s->ds); | |
1644 | 1640 | } else { |
1645 | 1641 | qemu_console_resize(s->ds, disp_width, height); |
1646 | 1642 | } |
... | ... | @@ -1651,7 +1647,7 @@ static void vga_draw_graphic(VGAState *s, int full_update) |
1651 | 1647 | s->last_line_offset = s->line_offset; |
1652 | 1648 | s->last_depth = depth; |
1653 | 1649 | full_update = 1; |
1654 | - } else if (is_graphic_console() && is_buffer_shared(s->ds->surface) && | |
1650 | + } else if (is_buffer_shared(s->ds->surface) && | |
1655 | 1651 | (full_update || s->ds->surface->data != s->vram_ptr + (s->start_addr * 4))) { |
1656 | 1652 | s->ds->surface->data = s->vram_ptr + (s->start_addr * 4); |
1657 | 1653 | dpy_setdata(s->ds); | ... | ... |