]> xenbits.xen.org Git - xenclient/ioemu-pq.git/commitdiff
only clear the framebuffer when we switch from text to graphic mode.
authorJean Guyader <jean.guyader@eu.citrix.com>
Tue, 1 Dec 2009 19:30:54 +0000 (19:30 +0000)
committerJean Guyader <jean.guyader@eu.citrix.com>
Tue, 1 Dec 2009 19:30:54 +0000 (19:30 +0000)
master/vga-clear-hw-fb-on-resize

index f081e2e8d68be20453809549df51bf490e1454c9..28c429d21321b5f3fe4bfca30bda54c90e8b37a5 100644 (file)
@@ -1,5 +1,5 @@
 diff --git a/hw/vga.c b/hw/vga.c
-index e4e27a9..c8d9077 100644
+index e4e27a9..21ea2ac 100644
 --- a/hw/vga.c
 +++ b/hw/vga.c
 @@ -638,6 +638,12 @@ static void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val)
@@ -15,19 +15,11 @@ index e4e27a9..c8d9077 100644
                  s->vbe_regs[VBE_DISPI_INDEX_VIRT_WIDTH] =
                      s->vbe_regs[VBE_DISPI_INDEX_XRES];
                  s->vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT] =
-@@ -1313,6 +1319,7 @@ static void vga_draw_text(VGAState *s, int full_update)
-         cw != s->last_cw || cheight != s->last_ch || s->last_depth) {
-         s->last_scr_width = width * cw;
-         s->last_scr_height = height * cheight;
+@@ -1610,6 +1616,7 @@ static void vga_draw_graphic(VGAState *s, int full_update)
+         disp_width != s->last_width ||
+         height != s->last_height ||
+         s->last_depth != depth) {
 +        memset(s->vram_ptr + (s->start_addr * 4), 0x00, s->line_offset * height);
-         qemu_console_resize(s->ds, s->last_scr_width, s->last_scr_height);
-         s->last_depth = 0;
-         s->last_width = width;
-@@ -1626,6 +1633,7 @@ static void vga_draw_graphic(VGAState *s, int full_update)
-         } else {
-             qemu_console_resize(s->ds, disp_width, height);
-         }
-+        memset(s->vram_ptr + (s->start_addr * 4), 0x00, s->line_offset * height);
-         s->last_scr_width = disp_width;
-         s->last_scr_height = height;
-         s->last_width = disp_width;
+         if (depth == 32) {
+             if (is_graphic_console()) {
+                 qemu_free_displaysurface(s->ds);