Re: Ways Apple COULD optimize -setNeedsDisplay
Re: Ways Apple COULD optimize -setNeedsDisplay
- Subject: Re: Ways Apple COULD optimize -setNeedsDisplay
- From: Marcel Weiher <email@hidden>
- Date: Tue, 18 Dec 2001 16:10:01 +0100
On Dienstag, Dezember 18, 2001, at 03:27 Uhr, Norbert Heger wrote:
Remember, there have been huge AppKit API changes from NEXTSTEP to
OPENSTEP:
NEXTSTEP: View - (id)drawSelf:(NXRect *)rects :(int)rectCount;
OPENSTEP: NSView - (void)drawRect:(NSRect)aRect;
Yes, that was also what I was thinking of. The original API had the
union-rect as rects[0], IIRC. Of course, I think almost everyone used
the union-rect to refresh their own views.
However, the fact that a single view can only update one rectangle at a
time doesn't imply the update process has to create one big
union-rectangle (even though I certainly thought it did at first). It
should be capable of keeping the rectangle-list in order to decide which
views to update, and then create a union-rectangle for each view that it
finds it must update.
Marcel
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.