On Dec 27, 2010, at 2:24 PM, vincent habchi wrote:

>> That, but I also don't see why the two layers would need to read the data 
>> separately. For example, their delegate can be the one to fetch and read the 
>> data and create the path from it, then save that CG path. When either layer 
>> draws, it would simply use that path. It'd be trivial.
> 
> That would be a nice trick, since it is more efficient to have the CGPaths 
> directly stored in a kind of NSArray than recomputed out of the DB, but I see 
> an obvious drawback: it is going to use a lot of memory to have all CGPaths 
> stored. Ideally, I was thinking about a way to do both operations "at once", 
> so the DB could be read line by line and contents immediately discarded (no 
> real memory overhead); but that seems unrealistic, given the present state of 
> the CA API. 


Well nobody says you have to keep the CGPaths around forever. Release them at 
your will. You can use NSCache even if you want.

You also have the option of simply assigning to the contents property of the 
layer. You don't *have* to wait for the drawing event to occur. 


--
Seth Willits



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to