[SDL] slooow

Mattias.Blomqvist at nokia.com Mattias.Blomqvist at nokia.com
Mon Apr 10 06:43:12 PDT 2000


> >I've made a small program that blits a 720x576 (24 bpp) 
> > image into a 800x600
> >SDL window. The problem is that its painfully slow. It takes 
> > over 200 ms to
> > >blit one image. Much much slower than doing it with 
> > gdk_draw_rgb_image (~110
> > >ms) from gtk+.
> > 
> > I doubt you will get it fast enough with MIT-SHM, if that is 
> > what you are
> > trying to do. Try x11perf -shmput500 to get a feeling for 
> > what is possible.
> > Make sure you are not trying to blit a 24bpp image onto a 32bpp
> > surface; that conversion will take some time. I don't think 
> XFree 3.x
> > supports 24bpp visuals (depth 24 will give you 32bpp).
> > 
> Remember that you are shoving 1.6 megs from memory, through 
> the CPU and to
> the frame buffer each time. If 16bpp is possible, blits 
> will be around
> twice as fast.
> 

I tried using a 32 bpp image and it is faster now. 
SDL_BlitSurface takes 50 ms and the SDL_UpdateRects takes 
another 30 ms. Still not fast enough though.
x11perf -shmput500 says it takes 22.9 ms to put a 500x500 image.

Mattias Blomqvist



More information about the SDL mailing list