home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!destroyer!gumby!yale!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!rutgers!cbmvax!peter
- From: peter@cbmvax.commodore.com (Peter Cherna)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: MakeScreen(); RethinkDisplay() vs. MakeVPort(); MrgCop(); LoadView()
- Message-ID: <33235@cbmvax.commodore.com>
- Date: 22 Jul 92 14:01:32 GMT
- References: <1b5c1b9e.ARN5a25@moria.UUCP> <paulk.0ucw@terapin.com>
- Reply-To: peter@cbmvax.commodore.com (Peter Cherna)
- Organization: Commodore-Amiga, Inc. West Chester, PA.
- Lines: 43
-
- In article <paulk.0ucw@terapin.com> paulk@terapin.com (Paul Kienitz) writes:
- >> 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?????
- >
- NEVER EVER EVER EVER do anything like the above. I don't care if
- you call Forbid(), LockIBase(), Disable(), or if you have a note
- from your mother. Intuition uses layers and graphics constructs
- to produce its display. If you want the convenience of Intuition,
- you must use the Intuition functions that manipulate those constucts
- (in your case, RethinkDisplay()). If you think you want to do direct
- manipulation of views/viewports, you must implement your own view and
- vieports.
-
- You cannot use MrgCop()/MakeVPort() on an Intuition screen or screens.
- Period. This method is not endorsed and is problematic.
-
- We didn't put delay loops in RethinkDisplay(), you know. It takes
- a while to execute because there is work to do.
-
- Peter
- --
- Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc.
- {uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com
- My opinions do not necessarily represent the opinions of my employer.
- "No guts, no glory."
-