From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3UAq-0001Bt-Jj for qemu-devel@nongnu.org; Fri, 21 Nov 2008 06:27:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3UAo-0001AK-Ez for qemu-devel@nongnu.org; Fri, 21 Nov 2008 06:27:43 -0500 Received: from [199.232.76.173] (port=55853 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3UAm-00019Z-KB for qemu-devel@nongnu.org; Fri, 21 Nov 2008 06:27:40 -0500 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:58569 helo=SMTP.EU.CITRIX.COM) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L3UAm-0008Tf-H1 for qemu-devel@nongnu.org; Fri, 21 Nov 2008 06:27:40 -0500 Message-ID: <49269C05.7080105@eu.citrix.com> Date: Fri, 21 Nov 2008 11:31:17 +0000 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1 of 2] [UPDATE] DisplayState interface change References: <49259735.8080807@eu.citrix.com> <200811201737.00254.paul@codesourcery.com> <4925A2F0.6000103@eu.citrix.com> <200811211040.44235.paul@codesourcery.com> In-Reply-To: <200811211040.44235.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8 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 Paul Brook wrote: >> If the backend is smart enought to share the buffer it does so checking >> that it is the current active console first (look at >> hw/vga.c:vga_draw_graphic, vga.c is the only "smart" backend at the >> moment). > > This worries me. We shouldn't have "smart" and dumb devices, they should all > just work. This suggests you've either got the abstraction wrong, or only > implemented half of the required changes. > > It feels like you're replacing one bit of host knowledge with another. IMHO We > should be aiming for individual devices to know less about how the host > displays the image. > All the backends work, but if a backend wants to reuse a preexisting buffer it needs to check that its QEMUConsole is the active console. This is not knowledge of the host, it is knowledge of the fact that my QEMUConsole could not be active at the moment. I could easily add a qemu_resizeDisplaySurfaceFrom that takes a pointer to a buffer but I thought that it was uglier, maybe I am wrong. > Ok. In that case we should be removing QEMUConsole and giving every output > source[*] its own DisplayState. > > [*] output source == Emulated device or virtual console. > Even though this model you are proposing is simpler, it has the disadvantage that implies a display buffer per backend while at the moment we are sharing it between multiple backends. In any case, I can assure you that the change you want to make does *not* go against my patches, they are orthogonal, they neither help nor cause problems to each other, so I would suggest to examine them separately.