From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAkpZ-00028q-Nz for qemu-devel@nongnu.org; Thu, 11 Dec 2008 07:39:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAkpY-00028Q-86 for qemu-devel@nongnu.org; Thu, 11 Dec 2008 07:39:49 -0500 Received: from [199.232.76.173] (port=33883 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAkpY-00028I-1z for qemu-devel@nongnu.org; Thu, 11 Dec 2008 07:39:48 -0500 Received: from mx20.gnu.org ([199.232.41.8]:60316) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LAkpX-0007im-LT for qemu-devel@nongnu.org; Thu, 11 Dec 2008 07:39:47 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LAkpV-0002VR-4o for qemu-devel@nongnu.org; Thu, 11 Dec 2008 07:39:45 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 0 of 7] [UPDATE] DisplayState interface change Date: Thu, 11 Dec 2008 12:39:40 +0000 References: <492D8B94.4000805@eu.citrix.com> <49358E1A.9000001@codemonkey.ws> <4940FFBF.1060308@eu.citrix.com> In-Reply-To: <4940FFBF.1060308@eu.citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812111239.41509.paul@codesourcery.com> 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 Cc: Stefano Stabellini > void qemu_console_resize(DisplayState *ds, int width, int height, int bpp, > int linesize, uint8_t *data) > { > TextConsole *s = get_graphic_console(); > s->g_width = width; > s->g_height = height; > if (is_graphic_console()) { > if (data && (bpp == 16 || bpp == 32)) { > qemu_freeDisplaySurface(ds->surface); > ds->surface = qemu_createDisplaySurfaceFrom(width, height, bpp, > linesize, data); } else { > ds->surface = qemu_resizeDisplaySurface(ds->surface, width, > height, 32, 4 * width); } > dpy_resize(ds); > } > } It feels wrong to be modifying the surface here. We already have to recreate the surface when we switch consoles, so why can't we use the same code for a resize? Paul