From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LaYmt-0000AO-3r for qemu-devel@nongnu.org; Fri, 20 Feb 2009 12:03:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LaYmp-00006P-Ml for qemu-devel@nongnu.org; Fri, 20 Feb 2009 12:03:39 -0500 Received: from [199.232.76.173] (port=42597 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaYmp-00006B-Hg for qemu-devel@nongnu.org; Fri, 20 Feb 2009 12:03:39 -0500 Received: from smtp.citrix.com ([66.165.176.89]:33166) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LaYmp-0001ID-1v for qemu-devel@nongnu.org; Fri, 20 Feb 2009 12:03:39 -0500 Message-ID: <499EE1FD.50704@eu.citrix.com> Date: Fri, 20 Feb 2009 17:01:49 +0000 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels References: <7fac565a0902150510y1fb01c6awd1dcc3b6e7b8232d@mail.gmail.com> <499EDC54.3020508@eu.citrix.com> <200902201652.55386.paul@codesourcery.com> In-Reply-To: <200902201652.55386.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: >> SDL_BlitSurface(guest_screen, &rec, real_screen, &rec); >> - SDL_UpdateRect(real_screen, x, y, w, h); >> + SDL_UpdateRects(real_screen, 1, &rec); > > Have you actually tried this? I'd be amazed and dismayed if it made any > difference. I can believe that SDL_UpdateRects is better that *multiple* > calls to SDL_UpdateRect. However I see absolutely no justification for this > change. > Of course I didn't: I don't have any MacOSX available and this is the main reason I am asking other people to test this patch and doing it myself. >>From the documentation I thought they were implemented differently somehow but now that you make me think about it I went through the actual code and SDL_UpdateRect is implemented using SDL_UpdateRects :( Also I don't how to explain the fact that SDL_Flip is faster than SDL_UpdateRect on MacOSX according to malc: the same libsdl macosx faq I linked before claims that SDL_DOUBLEBUF is not even supported on MacOsX.