From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Extremely slow graphic updates
Date: Tue, 20 Jan 2009 23:43:02 +0000 [thread overview]
Message-ID: <49766186.7020202@eu.citrix.com> (raw)
Hi all,
as you may be already aware of, the last displaystate interface change
slowed down the qemu monitor and the text vga text mode in general much
more then expected.
The reason for this is that to update the sdl window we are calling
SDL_Flip instead of SDL_UpdateRect.
SDL_Flip is necessary to update the SDL window when using double
buffering, when double buffering is disable it just falls back to
SDL_UpdateRect updating the whole screen.
So in our case we do not use double buffering so we are updating the
whole screen every time for no reason.
This patch fixes that.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
diff --git a/sdl.c b/sdl.c
index 73396e8..0c4a3e1 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_Flip(real_screen);
+ SDL_UpdateRect(real_screen, x, y, w, h);
}
static void sdl_setdata(DisplayState *ds)
reply other threads:[~2009-01-20 23:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=49766186.7020202@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).