From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels
Date: Fri, 20 Feb 2009 16:37:40 +0000 [thread overview]
Message-ID: <499EDC54.3020508@eu.citrix.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0902191811090.2143@linmac.oyster.ru>
malc wrote:
>
> It doesn't. FWIW not quite "value preserving" operation of removing call
> to SDL_UpdateRect from sdl_update and putting SDL_Flip into sdl_refresh
> does.
>
Going through the SDL documentation I found this:
http://www.libsdl.org/faq.php?action=listentries&category=7
Frequently Asked Questions: Mac OS
You may be able to make things faster by calling SDL_UpdateRects()
instead of SDL_UpdateRect() or SDL_Flip(). With SDL_UpdateRects()
you can tell SDL exactly what rectangles of the surface you painted,
and they will all be handed to the window server at once. That way,
the window server does the least amount of work possible.
So in theory this should make sdl faster on MacOSX:
diff --git a/sdl.c b/sdl.c
index 266fbcc..2ce20d2 100644
--- a/sdl.c
+++ b/sdl.c
@@ -62,7 +62,7 @@ static void sdl_update(DisplayState *ds, int x, int y,
int w, int h)
// printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
SDL_BlitSurface(guest_screen, &rec, real_screen, &rec);
- SDL_UpdateRect(real_screen, x, y, w, h);
+ SDL_UpdateRects(real_screen, 1, &rec);
}
static void sdl_setdata(DisplayState *ds)
next prev parent reply other threads:[~2009-02-20 16:39 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 [this message]
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
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=499EDC54.3020508@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.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).