Colorkeys on >16bpp displays

Hi!

I’m just tooo lazy to dig through SDLs code…

I have a 16bpp (or 24/32) display, alpha blitting is not accelerated.
Is there any speed advantage when using indexed colorkey surfaces instead of
hi-/truecolor surfaces with “black/white” (=only 0 or 255 values) alpha (as
the source to feed into DisplayFormat())? My first guess is that
DisplayFormat() converts colorkey surfaces to alpha surfaces on >16bpp
displays. Am I right?–
Benjamin Niemann (P!\K)
pink at odahoda.de
http://www.odahoda.de

I’m just tooo lazy to dig through SDLs code…

that’s ok but you could at least read the documentation

I have a 16bpp (or 24/32) display, alpha blitting is not accelerated.
Is there any speed advantage when using indexed colorkey surfaces instead of
hi-/truecolor surfaces with “black/white” (=only 0 or 255 values) alpha (as
the source to feed into DisplayFormat())? My first guess is that
DisplayFormat() converts colorkey surfaces to alpha surfaces on >16bpp
displays. Am I right?

no, DisplayFormat converts to the exact format of the destination
surface; colourkeying is preserved. DisplayFormatAlpha converts a
surface to a RGBA format suitable for alpha blitting to the screen,
and it converts colour keys to alpha channels

If you use RLE, there is practically no difference between colourkeying
and alpha channel as long as you use just 0/255. Without RLE, colourkeying
is faster. Another advantage of colourkeying is that it can be accelerated
on more platforms