SDL_LowerBlit?

Hello boys !!,(I’m new on this mailing list ,so don’t be too severe if I
make mistakes … :))
In the source code of ALIENS by Sam Lantiga ,I saw a call to SDL_LowerBlit
in the
UpdateScreen() function …

I didn’t find this SDL_LowerBlit in the ref manual !! ,what is it ? ,what is
it good for ?

Thanks in advence !!!

Freeman wrote:

Hello boys !!,(I’m new on this mailing list ,so don’t be too severe if I
make mistakes … :))
In the source code of ALIENS by Sam Lantiga ,I saw a call to SDL_LowerBlit
in the
UpdateScreen() function …

I didn’t find this SDL_LowerBlit in the ref manual !! ,what is it ? ,what is
it good for ?

The reason lies in the way SDL_BlitSurface() behaves. When you call
SDL_BlitSurface() (this is the same as SDL_UpperBlit(), it’s #defined
somewhere), the function first performs clipping/rectangle verification
and then calls SDL_LowerBlit(). So if you know your parameters are ok
and there will be no clipping, you can call SDL_LowerBlit() directly and
things will go (a little) faster. I don’t know wether it’s a good idea
to use it directly though, given that you don’t gain much from it and
you might crash your app if your parameters aren’t ok.

You should see the source for the SDL_UpperBlit() function for more
info, see SDL12/src/video/SDL_surface.c.

Stephane