[SDL] Does SDL clip surfaces on blitting?

Peter Ketting peterketting at sysmatrix.net
Sun Dec 30 01:59:50 PST 2007

> Yes, it does only display the size of your "screen" as James said. I am a
> bit interested in this myself from a performance standpoint, as a bit of
> code I have written in the past loads a large image into a surface. Does 
> spend time clipping the pixel data before blitting? I.E. is the unused
> portion of the image actually causing any performance impact as opposed to
> clipping the image manually before blitting?

Assuming you're using SDL_BlitSurface, which needs a source rect as an
argument, wouldn't that cause the clipping automatically? All you have to do
is read out the destination's surface's dimensions and use those as your
source rect dimensions.

Or am I missing something?


More information about the SDL mailing list