[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels |
Date: |
Fri, 20 Feb 2009 16:37:40 +0000 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080505) |
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)
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, (continued)
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, Stefano Stabellini, 2009/02/17
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, Alexey Eremenko, 2009/02/18
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, malc, 2009/02/18
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, Stefano Stabellini, 2009/02/18
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, malc, 2009/02/18
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, Alexey Eremenko, 2009/02/18
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, malc, 2009/02/18
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, Stefano Stabellini, 2009/02/18
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, malc, 2009/02/18
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, malc, 2009/02/19
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels,
Stefano Stabellini <=
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, Paul Brook, 2009/02/20
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, Stefano Stabellini, 2009/02/20
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, Paul Brook, 2009/02/20
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, malc, 2009/02/20
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, Stefano Stabellini, 2009/02/22
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, malc, 2009/02/23
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, Laurent Desnogues, 2009/02/20
- Re: [Qemu-devel] Re: Qemu 2D performance plunges below acceptable levels, Stefano Stabellini, 2009/02/18