From: Jean Guyader Date: Tue, 1 Dec 2009 19:30:54 +0000 (+0000) Subject: only clear the framebuffer when we switch from text to graphic mode. X-Git-Url: http://xenbits.xen.org/gitweb?a=commitdiff_plain;h=29671217a105a4f2322921d8106c7bc378331417;p=xenclient%2Fioemu-pq.git only clear the framebuffer when we switch from text to graphic mode. --- diff --git a/master/vga-clear-hw-fb-on-resize b/master/vga-clear-hw-fb-on-resize index f081e2e..28c429d 100644 --- a/master/vga-clear-hw-fb-on-resize +++ b/master/vga-clear-hw-fb-on-resize @@ -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);