On Apr 22, 2011, at 8:51 AM, Sebastian Mecklenburg wrote:
> 1) Is there a better way to maintain my own backbuffer? CGLayer perhaps? Haven't used it yet.
Probably won't help much, but it would certainly help to see how you are creating your bitmap context. You may get a slight boost doing this by assigning the created image to view.layer.contents instead of using -drawRect: and -setNeedsDisplay however (most noticeably on Retina devices since you will avoid the software scaler).
> 2) If not, I can create my buffer at twice the size, render the content at twice the size and set the scale factor of the ctm of the current context to 1. This gets me about 9 fps. CGContextDrawImage is down to about 20% but the path rendering takes longer. Even when I disable anti aliasing (which still looks good on a retina display) I get only 13 fps. Can I improve this further?
> Also, since there is no CGContextSetCTM method (I have to do CGContextScaleCTM(ctx, 0.5, 0.5)) I think there might be something wrong with that.
You shouldn't need to do anything to the current context to get this. If you double the size of your buffer on retina devices and draw it into the same view's bounds, you should get a transfer. Be certain to set your blend mode to kCGBlendModeCopy to avoid reading from the buffer (this may also help with what you already have).
> 3) Is CoreGraphics usable for animated content on iOS devices at all? I read several times that it renders really high quality images at the cost of speed. For the app I have in mind I need some good looking (i.e. anti aliased) animated (i.e. different shape in each frame) bezier curves at at least 20 fps. Can it be done? It would be so cool, because the quality is absolutely amazing!
It really depends on your goals. You may be able to do some things by taking advantage of CAShapeLayers instead of drawing them yourself, but you would have to check the performance difference yourself. Generally if performance is your primary goal, you want to be drawing with the CPU as little as possible.
--
David Duncan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden