4 ms·
As they made some note of, Core Animation is very picky about the image format you provide via the contents property. For example, if you retain a reference to
by rbritton 13y ago
As they made some note of, Core Animation is very picky about the image format you provide via the contents property. For example, if you retain a reference to a CGImageRef that you also assign to a CALayer's contents property, you will end up with at least double the memory usage if it's not in CA's preferred format and it makes a copy of it. In my experience doing that alone can help performance immensely.
I've since lost track of the Apple documentation that said it, but CA prefers 16-byte alignment and (kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little) for the pixel format.
- nielsbot 13y agoI think it can change from device to device too