From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels
Date: Fri, 20 Feb 2009 18:17:32 +0100 [thread overview]
Message-ID: <761ea48b0902200917t4e156346ifd48489ce8864fe8@mail.gmail.com> (raw)
In-Reply-To: <200902201652.55386.paul@codesourcery.com>
On Fri, Feb 20, 2009 at 5:52 PM, Paul Brook <paul@codesourcery.com> 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.
UpdateRect is a thin wrapper around UpdateRects. So thin I don't believe
it makes any difference (unless you're doing dozens of UpdateRect which
is not the case here as you pointed).
Laurent
void SDL_UpdateRect(SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h)
{
if ( screen ) {
SDL_Rect rect;
/* Perform some checking */
if ( w == 0 )
w = screen->w;
if ( h == 0 )
h = screen->h;
if ( (int)(x+w) > screen->w )
return;
if ( (int)(y+h) > screen->h )
return;
/* Fill the rectangle */
rect.x = (Sint16)x;
rect.y = (Sint16)y;
rect.w = (Uint16)w;
rect.h = (Uint16)h;
SDL_UpdateRects(screen, 1, &rect);
}
}
next prev parent reply other threads:[~2009-02-20 17:17 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-15 13:10 [Qemu-devel] Qemu 2D performance plunges below acceptable levels Alexey Eremenko
2009-02-15 17:11 ` [Qemu-devel] " Alexey Eremenko
2009-02-16 10:31 ` Stefano Stabellini
2009-02-16 11:47 ` Avi Kivity
2009-02-16 16:15 ` Stefano Stabellini
2009-02-16 16:36 ` Avi Kivity
2009-02-17 17:48 ` Avi Kivity
2009-02-17 19:00 ` Stefano Stabellini
2009-02-18 8:46 ` Alexey Eremenko
2009-02-18 9:33 ` malc
2009-02-18 10:48 ` Stefano Stabellini
2009-02-18 11:17 ` malc
2009-02-18 11:27 ` Alexey Eremenko
2009-02-18 11:32 ` malc
2009-02-18 12:12 ` Stefano Stabellini
2009-02-18 18:51 ` malc
2009-02-19 15:14 ` malc
2009-02-20 16:37 ` Stefano Stabellini
2009-02-20 16:52 ` Paul Brook
2009-02-20 17:01 ` Stefano Stabellini
2009-02-20 17:16 ` Paul Brook
2009-02-21 4:02 ` malc
2009-02-23 3:06 ` Stefano Stabellini
2009-02-23 6:43 ` malc
2009-02-20 17:17 ` Laurent Desnogues [this message]
2009-02-18 10:43 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=761ea48b0902200917t4e156346ifd48489ce8864fe8@mail.gmail.com \
--to=laurent.desnogues@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).