From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJV0E-00064h-3k for qemu-devel@nongnu.org; Wed, 24 Jun 2009 12:07:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJV07-00063t-57 for qemu-devel@nongnu.org; Wed, 24 Jun 2009 12:07:11 -0400 Received: from [199.232.76.173] (port=39313 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJV06-00063Z-Ii for qemu-devel@nongnu.org; Wed, 24 Jun 2009 12:07:06 -0400 Received: from mail-fx0-f209.google.com ([209.85.220.209]:37461) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJV06-00038x-2Z for qemu-devel@nongnu.org; Wed, 24 Jun 2009 12:07:06 -0400 Received: by fxm5 with SMTP id 5so803841fxm.34 for ; Wed, 24 Jun 2009 09:07:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4A4206D1.4010002@eu.citrix.com> References: <4A4206D1.4010002@eu.citrix.com> Date: Wed, 24 Jun 2009 19:07:04 +0300 Message-ID: Subject: Re: [Qemu-devel] [PATCH] sdl zooming From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: "qemu-devel@nongnu.org" On 6/24/09, Stefano Stabellini wrote: > Hi all, > this patch implements zooming capabilities for the sdl interface. > A new sdl_zoom_blit function is added that is able to scale and blit a > portion of a surface into another. > This way we can enable SDL_RESIZABLE and have a real_screen surface with > a different size than the guest surface and let sdl_zoom_blit take care > of the problem. As you are already using the template system, for extra performance, you could remove 'smooth' as parameter and instantiate separate functions for both cases with something like: static int glue(glue(sdl_zoom_rgb, BPP), _ ## SMOOTH)(SDL_Surface *src, SDL_Surface *dst, SDL_Rect *dst_rect) Then s/smooth/SMOOTH/g in the function and adjust callers.