Improving CoreGraphics performance on iPhone4
<p>I'm compositing two (static) images, several times a second.   This code runs pretty snappily on the 3Gs, and really slowly on the iPhone4.   TimeProfiler reveals that the call to UIImage drawAtPoint: ends up calling something very expensive called "argb_sample_RGBA21".   This routine is never called on the 3Gs.   Is there some byte-order conversion that I could perform on the static images once, thus saving this byte-order conversion?</p>

<pre><code>+ (UIImage * ) createInterpolatedImageBetween: (UIImage *) imageA
                                     andImage:  (UIImage *) imageB
                                     forValue: (float) fractionalValue {

      UIGraphicsBeginImageContextWithOptions(CGSizeMake(imageA.size.width, imageA.size.height), YES, 0.0); 

      [imageA drawAtPoint: CGPointMake(0,0)];

      [imageB drawAtPoint: CGPointMake(0,0) 
                blendMode: kCGBlendModeNormal 
                    alpha: fractionalValue];


      UIImage *answer = UIGraphicsGetImageFromCurrentImageContext(); 
      UIGraphicsEndImageContext();
      return answer;
</code></pre>

<p>}</p>
