On May 21, 2010, at 10:37 AM, Troy Stephens wrote:

> By the way: I don't know whether CAGradientLayer disregards -setNeedsDisplay 
> (since the layer renders its content programmatically), possibly making this 
> irrelevant in practice, but in cases like this, where you provide a layer of 
> your own that already has content, and you don't want AppKit to ever invoke 
> the view's -drawRect: to draw view content into the layer, it's a good idea 
> to -setLayerContentsRedrawPolicy:NSViewLayerContentsRedrawNever on the view.


The CAGradientLayer (and the CAShapeLayer) both respect -setNeedsDisplay and go 
through the normal CG drawing path, so it would definitely be recommended to 
specify the never redraw policy.
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

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