Blitting - benchmark questions

Hullo there,
I made some benchmark tests to try out the different ways of blitting a
surface (in windowed mode) and I don’t quite understand the results:

I run X11 in 16bpp and initialize the window with SDL_ANYFORMAT. After
that I load 10 surfaces that are all 8bpp and make my benchmark (a 1000
screen-updates) which took 18 secs.

When I use SDL_ConvertSurface or SDL_DisplayFormat when loading the
surfaces it is slowed down to 40 secs.

Of course there needs to be copied a larger amount since all the bitmaps
are converted to 16bpp, but I thought that the same conversion and
amount of copying would be done implicitly for every blit when not
converting. Is this not correct?

Also it appears not to matter whether or not I use SDL_HWSURFACE og
SDL_SWSURFACE, but maybe that applies only to fullscreen modes??

Any comments very much appreciated.

Yours sincerely,
/morten bek

Hullo there,
I made some benchmark tests to try out the different ways of blitting a
surface (in windowed mode) and I don’t quite understand the results:

I run X11 in 16bpp and initialize the window with SDL_ANYFORMAT. After
that I load 10 surfaces that are all 8bpp and make my benchmark (a 1000
screen-updates) which took 18 secs.

When I use SDL_ConvertSurface or SDL_DisplayFormat when loading the
surfaces it is slowed down to 40 secs.

I’ve seen this too. Can you send me your benchmark?

Of course there needs to be copied a larger amount since all the bitmaps
are converted to 16bpp, but I thought that the same conversion and
amount of copying would be done implicitly for every blit when not
converting. Is this not correct?

Also it appears not to matter whether or not I use SDL_HWSURFACE og
SDL_SWSURFACE, but maybe that applies only to fullscreen modes??

That’s correct.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec