From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60767 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzVdA-00017A-Ob for qemu-devel@nongnu.org; Tue, 15 Mar 2011 10:53:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzVd9-0003FW-9C for qemu-devel@nongnu.org; Tue, 15 Mar 2011 10:53:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzVd9-0003FO-0k for qemu-devel@nongnu.org; Tue, 15 Mar 2011 10:53:51 -0400 Message-ID: <4D7F7D65.50202@redhat.com> Date: Tue, 15 Mar 2011 15:53:25 +0100 From: Jes Sorensen MIME-Version: 1.0 References: <1300192574-32644-1-git-send-email-Jes.Sorensen@redhat.com> <1300192574-32644-2-git-send-email-Jes.Sorensen@redhat.com> <4D7F7C60.9050500@codemonkey.ws> In-Reply-To: <4D7F7C60.9050500@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/7] Consolidate DisplaySurface allocation in qemu_alloc_display() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: jan.kiszka@siemens.com, qemu-devel@nongnu.org, peter.maydell@linaro.org On 03/15/11 15:49, Anthony Liguori wrote: >> index f4e4741..dec9a76 100644 >> --- a/console.h >> +++ b/console.h >> @@ -189,6 +189,9 @@ void register_displaystate(DisplayState *ds); >> DisplayState *get_displaystate(void); >> DisplaySurface* qemu_create_displaysurface_from(int width, int >> height, int bpp, >> int linesize, >> uint8_t *data); >> +DisplaySurface* qemu_alloc_display(DisplaySurface *surface, int width, >> + int height, int linesize, >> + PixelFormat pf, int newflags); > > Is it really useful at all to return DisplaySurface? When I see a > return value of 'DisplaySurface *' and an alloc in the function name, I > assume this function allocates a display surface but it's really > allocating the framebuffer within a display surface. I am not sure what is better here - if you have a better suggestion for the name, I am all open. The reason it turned out this way is that there are already other ways where the DisplaySurface itself can be allocated. Cheers, Jes