From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Li8tx-0008Av-NX for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:02:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Li8tw-00089q-Qj for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:02:21 -0400 Received: from [199.232.76.173] (port=40767 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Li8tw-00089c-LH for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:02:20 -0400 Received: from savannah.gnu.org ([199.232.41.3]:33004 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Li8tw-0007mE-5T for qemu-devel@nongnu.org; Fri, 13 Mar 2009 11:02:20 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Li8tv-000894-Fp for qemu-devel@nongnu.org; Fri, 13 Mar 2009 15:02:19 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1Li8tv-000890-64 for qemu-devel@nongnu.org; Fri, 13 Mar 2009 15:02:19 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Fri, 13 Mar 2009 15:02:19 +0000 Subject: [Qemu-devel] [6840] remove is_graphic_console from vga.c (Stefano Stabellini) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6840 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6840 Author: aliguori Date: 2009-03-13 15:02:18 +0000 (Fri, 13 Mar 2009) Log Message: ----------- 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 Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/hw/vga.c Modified: trunk/hw/vga.c =================================================================== --- trunk/hw/vga.c 2009-03-13 15:02:13 UTC (rev 6839) +++ trunk/hw/vga.c 2009-03-13 15:02:18 UTC (rev 6840) @@ -1629,18 +1629,14 @@ #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 @@ 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);