From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3Ejp-0007KK-HT for qemu-devel@nongnu.org; Thu, 20 Nov 2008 13:58:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3Ejn-0007JP-SE for qemu-devel@nongnu.org; Thu, 20 Nov 2008 13:58:49 -0500 Received: from [199.232.76.173] (port=48473 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3Ejn-0007JJ-LG for qemu-devel@nongnu.org; Thu, 20 Nov 2008 13:58:47 -0500 Received: from ey-out-1920.google.com ([74.125.78.147]:7092) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L3Ejn-0006ha-7B for qemu-devel@nongnu.org; Thu, 20 Nov 2008 13:58:47 -0500 Received: by ey-out-1920.google.com with SMTP id 4so262968eyk.4 for ; Thu, 20 Nov 2008 10:58:44 -0800 (PST) Message-ID: <4925B35F.20701@codemonkey.ws> Date: Thu, 20 Nov 2008 12:58:39 -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> In-Reply-To: <49259735.8080807@eu.citrix.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: qemu-devel@nongnu.org, Stefano Stabellini Hi Stefano, Stefano Stabellini wrote: > Hi all, > this patch changes the DisplayState interface adding support for > multiple frontends at the same time (sdl and vnc) and implements most > of the benefit of the shared_buf patch without the added complexity. > > Currently DisplayState is managed by sdl (or vnc) and sdl (or vnc) is > also responsible for allocating the data and setting the depth. > Vga.c (or another backend) will do any necessary conversion. > > The idea is to change it so that is vga.c (or another backend) that > fully manages the DisplayState interface allocating data and setting the > depth (either 16 or 32 bit, if the guest uses a different resolution or > is in text mode, vga.c (or another backend) is in charge of > doing the conversion seamlessly). > > The other idea is that DisplayState supports *multiple* frontends > like sdl and vnc; each of them can register some callbacks to be called > when a display event occurs. > > Signed-off-by: Stefano Stabellini > 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; } You can do the mechanical conversion in a single patch. That patch will then be a breeze to review. Then in your next patch, you can just convert these accessors to use the new ds->surface->linesize. That should make this all considerably easier to thoroughly review. It's just too big right now to review properly. Regards, Anthony Liguori