[SDL] Faster way to do an SDL_BlitSurface

Manuel García Cabrera manugarciac5 at yahoo.com.ar
Fri May 4 09:55:45 PDT 2007


> Mmmm, I found out that the BlitSurface isn't necesarily the one eating
> my time... I'll explain a little bit what I'm displaying: I have an
> aplication that captures the screen, XORs with the previous screen
> capture and compresses it before writing on a file. It does that as fast
> as it can. Ok, when on the Player side, I open the file, read the data
> from the file, uncompress it, XOR it and show it.
> 
> Ok, now I know that BlitSurface isn't necesarily eating my time. The
> pics I send through the file are 24bit bitmaps. If I do SDL_Init with my
> current color depth (that would be 32 bits) the one eating the time is
> indeed SDL_BlitSurface. However, if I do the SDL_Init with 24bits as
> color depth, the BlitSurface is practically auotomatic (the memcpy works
> here too), but the SDL_UpdateRect eats the time now... Even more that
> the BlitSurface in the previous case...
> 
> Any ideas of what I could to do speed this up?
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> 


I meant SetVideoMode, not Init.


More information about the SDL mailing list