I ran tests with kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big
vs kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little
and the profiler did show me that there is a slightly different code path.
kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little
copies memory directly, while kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big
goes through a conversion function.
This made almost no impact in the total time it took to draw paths in my CGBitmapContext
(even on an iPod 4) and then call setNeedsDisplayInRect:
to show them on screen. Furthermore since the overall times are essentially identical, I'm sticking with kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big
.
EDIT
I switched back to kCGBitmapByteOrder32Little
in order to have better compatibility with other iOS frameworks (like AVFoundation) that use BGRA (little endian) byte orders since there was no impact on performance.