On 27 Jun 2008, at 3:42 am, Markus Spoettl wrote:

On Jun 26, 2008, at 4:15 AM, Graham Cox wrote:
I think this is your problem. After the first rect is marked as needing update, the needsDisplay method will return YES. That then rejects all subsequent rect marking until the next event loop and the view has been redrawn. Then another rect gets a shot, and so on. Simply removing that if([![self needsDisplay]) should fix your problem, I think.

For whatever reason, simply calling -setNeedsDisplay:YES without update rectangle and needsDisplay check is producing the same kind of lag. The view is not updated any faster or more accurately. Granted, the needsDisplay check may be wrong though, I can see the issue there.


you can still (and should) use -setNeedsDisplayInRect:, just don't make this conditional on -needsDisplay.

I think to really get to the bottom of the delay problem we'd need to see the code in its full context. For example how does your drawRect: method know which rect(s) to repaint? Or does it just go over the whole lot? There could be many reasons why it's slow.

Graham

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to