Is setNeedsDisplayInRect: smarter than I thought?
Is setNeedsDisplayInRect: smarter than I thought?
- Subject: Is setNeedsDisplayInRect: smarter than I thought?
- From: Eric <email@hidden>
- Date: Tue, 9 May 2006 15:32:56 -0700
I thought all that setNeedsDispalyInRect: does is it passes the dirty
rectangle to drawRect:, and if drawRect: ignores the rect passed in, then
the whole view will be redrawn and updated on screen. In other words, I
thought no "clipping" would be done.
However, this is not the case after some experiement (using Quartz Debug).
It appears invoking setNeedsDisplayInRect: actually causes the screen update
region to be clipped to the dirty rect. So, even if my drawRect redraws the
whole view, only drawing within the dirty region will updated on screen.
Is this expected?
But if I ignore the dirty rect passed into drawRect, this "clipping" doesn't
actually makes things any faster right? Since Quartz is still rendering the
whole view within drawRect (which is what's the real time-consuming part).
Could someone help me clear up the concept?
Thanks
Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden