From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KiK0P-000523-Ap for qemu-devel@nongnu.org; Tue, 23 Sep 2008 22:21:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KiK0N-00051r-3G for qemu-devel@nongnu.org; Tue, 23 Sep 2008 22:21:28 -0400 Received: from [199.232.76.173] (port=35030 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KiK0M-00051o-Vf for qemu-devel@nongnu.org; Tue, 23 Sep 2008 22:21:27 -0400 Received: from savannah.gnu.org ([199.232.41.3]:60908 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 1KiK0M-0005hg-Lj for qemu-devel@nongnu.org; Tue, 23 Sep 2008 22:21:26 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KiK0L-0004H6-Ly for qemu-devel@nongnu.org; Wed, 24 Sep 2008 02:21:25 +0000 Received: from balrog by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KiK0L-0004H2-4X for qemu-devel@nongnu.org; Wed, 24 Sep 2008 02:21:25 +0000 MIME-Version: 1.0 Errors-To: balrog Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Andrzej Zaborowski Message-Id: Date: Wed, 24 Sep 2008 02:21:25 +0000 Subject: [Qemu-devel] [5308] Don't use ds->dpy_copy directly from hw/ (Jan Niehusmann). 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: 5308 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5308 Author: balrog Date: 2008-09-24 02:21:24 +0000 (Wed, 24 Sep 2008) Log Message: ----------- Don't use ds->dpy_copy directly from hw/ (Jan Niehusmann). I left a TODO in the code because this still doesn't definitely fix all issues. Modified Paths: -------------- trunk/console.c trunk/console.h trunk/hw/cirrus_vga.c trunk/hw/vmware_vga.c Modified: trunk/console.c =================================================================== --- trunk/console.c 2008-09-24 01:13:40 UTC (rev 5307) +++ trunk/console.c 2008-09-24 02:21:24 UTC (rev 5308) @@ -1343,3 +1343,16 @@ } } } + +void qemu_console_copy(QEMUConsole *console, int src_x, int src_y, + int dst_x, int dst_y, int w, int h) { + if (active_console == console) { + if (console->ds->dpy_copy) + console->ds->dpy_copy(console->ds, + src_x, src_y, dst_x, dst_y, w, h); + else { + /* TODO */ + console->ds->dpy_update(console->ds, dst_x, dst_y, w, h); + } + } +} Modified: trunk/console.h =================================================================== --- trunk/console.h 2008-09-24 01:13:40 UTC (rev 5307) +++ trunk/console.h 2008-09-24 02:21:24 UTC (rev 5308) @@ -140,6 +140,8 @@ void console_select(unsigned int index); void console_color_init(DisplayState *ds); void qemu_console_resize(QEMUConsole *console, int width, int height); +void qemu_console_copy(QEMUConsole *console, int src_x, int src_y, + int dst_x, int dst_y, int w, int h); /* sdl.c */ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame); Modified: trunk/hw/cirrus_vga.c =================================================================== --- trunk/hw/cirrus_vga.c 2008-09-24 01:13:40 UTC (rev 5307) +++ trunk/hw/cirrus_vga.c 2008-09-24 02:21:24 UTC (rev 5308) @@ -769,13 +769,13 @@ s->cirrus_blt_width, s->cirrus_blt_height); if (notify) - s->ds->dpy_copy(s->ds, - sx, sy, dx, dy, - s->cirrus_blt_width / depth, - s->cirrus_blt_height); + qemu_console_copy(s->console, + sx, sy, dx, dy, + s->cirrus_blt_width / depth, + s->cirrus_blt_height); /* we don't have to notify the display that this portion has - changed since dpy_copy implies this */ + changed since qemu_console_copy implies this */ if (!notify) cirrus_invalidate_region(s, s->cirrus_blt_dstaddr, Modified: trunk/hw/vmware_vga.c =================================================================== --- trunk/hw/vmware_vga.c 2008-09-24 01:13:40 UTC (rev 5307) +++ trunk/hw/vmware_vga.c 2008-09-24 02:21:24 UTC (rev 5308) @@ -384,7 +384,7 @@ # ifdef DIRECT_VRAM if (s->ds->dpy_copy) - s->ds->dpy_copy(s->ds, x0, y0, x1, y1, w, h); + qemu_console_copy(s->console, x0, y0, x1, y1, w, h); else # endif {