Re: CALayer - delegate not being called?
Re: CALayer - delegate not being called?
- Subject: Re: CALayer - delegate not being called?
- From: Scott Anguish <email@hidden>
- Date: Wed, 28 Nov 2007 13:43:03 -0500
Well, it isn't quite the same.. not drawing, but compositing.
The border is a style attribute (and is an animatable property). All
animatable properties are applied by the render-tree when the layer is
displayed in the UI. So they get composited when you change the
values via the implied animation (unless of course that has been
disabled for the transaction in which case they still will update and
draw, but without interpolating the values from the current value to
the new value).
You can imagine that if the content was redrawn (by the delegate)
every time a value changed and animated (so potentially hundreds of
times for a single animation) that you'd lose most of the advantages
of Core Animation.
Regardless, animatable properties are not aren't cached and are
separate from the content caching process.
You don't have to, and should not, call setNeedsDisplay for any layers
that do not have a delegate that provides the content. This will
create a content cache and cause more memory to be used for the cached
content. For larger empty layers that are used only to contain other
layers it is unnecessary.
I'll spend some time clarifying this in the Core Animation Programming
Guide in both the Providing Layer Content and Layer Style Properties
chapters.
On Nov 28, 2007, at 5:21 AM, John Clayton wrote:
Hi Scott,
But Neil is saying that the border of the layer is visible, thus the
layer must be drawing itself at some point already, right?
_______________________________________________
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