Re: VU meter drawing performance
Re: VU meter drawing performance
- Subject: Re: VU meter drawing performance
- From: Shawn Erickson <email@hidden>
- Date: Fri, 18 Dec 2009 17:15:48 -0800
On Fri, Dec 18, 2009 at 10:41 AM, Ethan Funk <email@hidden> wrote:
> Yep, that fixes the VU meter drawing! I though that by using
> setNeedsDisplay, one update would be popped off the queue per refresh cycle.
> But it looks like a refresh cycle refreshes ALL queued updates. I was not
> aware of the Quartz drawing penalty, but it does make sense from an OS point
> of view.
The methods setNeedsDisplay: marks your view, etc. as needing a redraw
(dirty). At the end of the current application runloop cycle your
dirty views are asked to draw themselves (drawRect:). In other words
you can call setNeedsDisplay: a hundred times in a given runloop cycle
but your view will only get drawRect: once.
Anyway it sounds like your real issue may have been attempting to draw
things outside of a call to drawRect: which isn't a valid thing to do.
Please review the following...
http://developer.apple.com/Mac/library/documentation/Cocoa/Conceptual/CocoaViewsGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40002978-CH1-SW1
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden