From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3Ilb-00051m-Cd for qemu-devel@nongnu.org; Thu, 20 Nov 2008 18:16:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3IlZ-00051H-K0 for qemu-devel@nongnu.org; Thu, 20 Nov 2008 18:16:54 -0500 Received: from [199.232.76.173] (port=47682 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3IlZ-00051E-CI for qemu-devel@nongnu.org; Thu, 20 Nov 2008 18:16:53 -0500 Received: from an-out-0708.google.com ([209.85.132.249]:45210) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L3IlZ-00049c-1X for qemu-devel@nongnu.org; Thu, 20 Nov 2008 18:16:53 -0500 Received: by an-out-0708.google.com with SMTP id c38so310507ana.37 for ; Thu, 20 Nov 2008 15:16:51 -0800 (PST) Message-ID: <4925EFDF.4090709@codemonkey.ws> Date: Thu, 20 Nov 2008 17:16:47 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1 of 2] [UPDATE] DisplayState interface change References: <49259735.8080807@eu.citrix.com> <4925B35F.20701@codemonkey.ws> <200811202246.18906.paul@codesourcery.com> In-Reply-To: <200811202246.18906.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org, Stefano Stabellini Paul Brook wrote: >> There are really two parts to this patch. One part is a completely >> mechanical conversion of things like ds->linesize to >> ds->surface->linesize. The second is the guys of the API change. >> >> If you introduce accessors to access things like linesize from >> DisplayState, so something like: >> >> int ds_get_linesize(DisplayState *ds) { >> return ds->linesize; >> } >> > > I think this sort of thing should be going via the console structures. > i.e. vga emulation deals entirely with a QEMUConsole. sdl/vnc deal entirely > with a DisplayState, and qemu mediates in between. > BTW, I really like the idea of just using DisplayState because it implies that you could stack these things in multiple orders. For instance, you may want to have a DisplayState that took two DisplayStates, and produced a tiled image (think side-by-side VGA displays). You may want to take that DisplayState and combine it with a DisplayState for serial/monitor/parallel so that you can switch by the side-by-side VGA display and the other consoles. Using the same structure here gives you lots of flexibility in how you stack these things. Regards, Anthony Liguori > Paul >