Search code examples
iphonecocoa-touchuikitcore-animationinstruments

What is an "misaligned image" in terms of Core Animation in iPhone OS?


Instruments tells that there are "misaligned images" which are animated by core animation. What does that mean?

UPDATE: I've seen that in Instruments.app > Core Animation.


Solution

  • I'd love more information about where you're seeing this, but my suspicion is that it's referring to an image that is not pixel-aligned. Quartz allows you to draw at fractional pixels (recall that CGPoint takes CGFloats, not NSIntegers), but it's more expensive and tends to create a bit of blurriness. You can't really draw on a fractional pixel, so Quartz has to do anti-aliasing to pull it off. That takes time and certainly would hurt Core Animation performance.

    Quartz will not warn you that you're drawing on fractional pixels, and it's particularly unkind to text. So it's something you need to think about any time you're doing programmatic layout.