Re: Optimizing NSRectFill
Re: Optimizing NSRectFill
- Subject: Re: Optimizing NSRectFill
- From: "Kyle Sluder" <email@hidden>
- Date: Sat, 20 Dec 2008 13:51:29 -0500
On Sat, Dec 20, 2008 at 12:18 PM, Michael Ash <email@hidden> wrote:
> A simple way to do this is to avoid calling setNeedsDisplay: (or its
> friends) directly from your event handler. Instead start a timer with
> some suitably small interval, and set a flag. If the flag is already
> set, don't start the timer, it's already been started. When the timer
> fires, invalidate the view and clear the flag.
Alright, perhaps I don't completely understand how the drawing model
works at a low enough level, but why would this be helpful? Doesn't
AppKit just coalesce updates received by -setNeedsDisplayInRect: until
Quartz has finished pushing pixels? So if you are accumulating dirty
rects in your event handler, your drawing should still be limited to
min(as fast as possible, 60hz).
Or am I thinking of the Quartz GL pipeline?
--Kyle Sluder
_______________________________________________
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