home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!swrinde!mips!apple!apple!netcomsv!terapin!paulk
- From: paulk@terapin.com (Paul Kienitz)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: MakeScreen(); RethinkDisplay() vs. MakeVPort(); MrgCop(); LoadView()
- Message-ID: <paulk.0ucw@terapin.com>
- Date: 22 Jul 92 02:31:14 GMT
- References: <1b5c1b9e.ARN5a25@moria.UUCP>
- Organization: BBS
- Lines: 47
-
- > Paul Kienitz recently (on July 5) claimed that the following code:
- >
- > MakeScreen(screen);
- > RethinkDisplay();
- >
- > could be replaced with:
- >
- > MakeVPort(&IntuitionBase->ViewLord, &screen->ViewPort);
- > MrgCop(&IntuitionBase->ViewLord);
- > LoadView(&IntuitionBase->ViewLord);
- >
- > without any Intuition compatibility problems whatsoever.
-
- That I had experienced. I have since heard of several people having
- trouble, though.
-
- > The code violates
- > the rule that you should lock IntuitionBase while mucking with the fields.
- > So a more correct method would appear to be this:
- >
- > ULONG iBaseLock = LockIBase(0);
- >
- > MakeVPort(&IntuitionBase->ViewLord, &screen->ViewPort);
- > MrgCop(&IntuitionBase->ViewLord);
- > LoadView(&IntuitionBase->ViewLord);
- > UnlockIBase(iBaseLock);
- >
- > and indeed I haven't managed to crash my machine with this code yet
-
- I think when I posted it I had the stuff inside a Forbid(). Is that
- an adequate substitute for LockIBase? Maybe those who got crashes
- didn't Forbid. LockIBase is clearly a more optimal approach though,
- if it really works.
-
- Now the question is, if this DOES really work, why the heck is
- RethinkDisplay so damn slow?????
-
- > Now I wonder whether this method is endorsed at all by Commodore.
- > My hunch is that it isn't, but I would like to hear the official
- > word on this :-)
-
- Me too.
-
- Note that it was not me who originally suggested it -- I was just repeating
- someone else's suggestion which had worked for me -- sped up my little program
- enough to put back in some WaitTOFs which had been taken out because
- RethinkDisplay was slow enough to eat a whole frame.
-