1

And maybe the first question is: is it useful or possible to get a graphics context cached on the GPU: On iPad 1, 2, and the New iPad, PowerVR is used as the GPU, and does it use the RAM as graphics memory? If so, can it and does it help if we get a graphics context cached on the GPU?

If in fact it can, then how would we get such a graphics context? There are mentioning of CGLayer and CALayer: CGLayer can be cached on GPU, and CALayer is often cached on the GPU, but CGLayer is obtained from another context, using CGLayerCreateWithContext, and that context supposedly should be a Window graphics context and it is only mentioned for how to get a Window Graphics Context on Mac OS X, not iOS. The part that mentioned how to get a "View Graphics Context" is actually the same context obtained in CALayer: CALayer began the display and drawInContext by using a Bitmap Graphics Context, it seems, and finally calls drawRect in UIView using this bitmap context, and I am not sure whether the idea that CALayer is cached on the GPU actually meant this Bitmap Graphics Context or does it mean layer.contents which is a CGImage, so the caching is actually on this image, not the graphics context.

nonopolarity
  • 146,324
  • 131
  • 460
  • 740
  • I'm confused about what you're asking. Why does the exact mechanism matter for the conversion of drawn content within a CALayer to a rasterized bitmap, which is then cached on the GPU? However it occurs, the end result is that Quartz content drawn within a CALayer is converted to a bitmap and stored on the GPU. If you need to update that content (beyond simple movement, rotation, or other transformations), you redraw the layer and its contents are re-cached. If you're talking about drawing entirely on the GPU, you're getting into OpenGL ES territory. – Brad Larson Jun 01 '12 at 03:26
  • if the graphics context is cached on the GPU, then hopefully it is faster for any drawing and any conversion to CGImage or displaying it on screen, than if the graphics context is in RAM? – nonopolarity Jun 01 '12 at 04:27

0 Answers0