Re: Threaded drawing
Re: Threaded drawing
- Subject: Re: Threaded drawing
- From: Graham Cox <email@hidden>
- Date: Tue, 10 Dec 2013 11:08:12 +0100
On 10 Dec 2013, at 10:52 am, Mike Abdullah <email@hidden> wrote:
> Another option to consider is using CAShapeLayer to render individual objects where reasonable. This should allow Core Animation to efficiently render such vectors without a dedicated backing store.
CAShapeLayers really don’t scale much at all before OpenGL falls over. Consider a simple shape with a bounds of about 100 x 100 points. At my maximum zoom level that becomes 2,500,000 points in terms of the screen. Of course, the vast majority is clipped and does not represent any actual pixels, but seemingly the CA system doesn’t know that and such a size can’t be set. In practical terms the most zoom I could reliably get from CAShapeLayer was about 4x.
The other problem is that CA.. anything must live in a view. My vector data model doesn’t really care about views. The same model can be rendered into multiple views if you want. At the very top level, a view’s drawRect: method calls into the model to tell it to draw a region into a context - much like CALayers - but the model is otherwise self-contained. While Apple claim CA *is* a model, it’s one firmly welded to a single view somewhere. Architecturally, CA doesn’t fit. Where it might be useful is to manage backing store issues at the top, view level. So possibly CATileLayer may help, but I can’t see CAShapeLayer practically fitting in anywhere. My reading of the CA system may be wrong, but again I’m constrained by what documentation there is, which is only barely adequate.
—Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden