Re: CoreAnimation efficiency
Re: CoreAnimation efficiency
- Subject: Re: CoreAnimation efficiency
- From: Jens Alfke <email@hidden>
- Date: Thu, 6 Mar 2008 13:16:28 -0800
On 6 Mar '08, at 2:43 AM, Half Activist wrote:
As I'm investigating on which drawing techniques to use for a
software I'm planing to create,
imagine a kind of vector drawing program (that's not really that
but a somewhat similar).
In its actual version, all drawing relies on NSBezierPath/Quartz
primitives and is really fast.
Now, I'd like to use CALayers and CoreAnimation extensively
I've used CA but am not an expert on its implementation. Here's my
take. Large numbers of layers aren't a problem. Large numbers of
layers *with custom drawing* would be a problem. That's because such a
layer will have a pixmap backing it, and CA will try to keep the
layers' pixmaps in the graphics coprocessor's memory, which is rather
limited.
Bezier paths don't seem like a good candidate for representing via
individual CA layers. A large but simple path can be represented as a
few dozen bytes of memory in an NSBezierPath object, but would require
megabytes of memory for a pixmap. Drawing the pixmap will also require
processing a lot more pixels than drawing the path; if the path is
unfilled, it might be hundreds of times as many.
(On the other hand, layers consisting of solid colors, borders, round
corners and/or text are very cheap, because they're drawn using OpenGL
primitives and don't need a pixmap.)
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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