home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / amiga / programm / 11477 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  2.3 KB

  1. Path: sparky!uunet!gatech!destroyer!gumby!yale!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!rutgers!cbmvax!peter
  2. From: peter@cbmvax.commodore.com (Peter Cherna)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: MakeScreen(); RethinkDisplay() vs. MakeVPort(); MrgCop(); LoadView()
  5. Message-ID: <33235@cbmvax.commodore.com>
  6. Date: 22 Jul 92 14:01:32 GMT
  7. References: <1b5c1b9e.ARN5a25@moria.UUCP> <paulk.0ucw@terapin.com>
  8. Reply-To: peter@cbmvax.commodore.com (Peter Cherna)
  9. Organization: Commodore-Amiga, Inc.  West Chester, PA.
  10. Lines: 43
  11.  
  12. In article <paulk.0ucw@terapin.com> paulk@terapin.com (Paul Kienitz) writes:
  13. >> The code violates
  14. >> the rule that you should lock IntuitionBase while mucking with the fields.
  15. >> So a more correct method would appear to be this:
  16. >> 
  17. >>       ULONG iBaseLock = LockIBase(0);
  18. >> 
  19. >>       MakeVPort(&IntuitionBase->ViewLord, &screen->ViewPort);
  20. >>       MrgCop(&IntuitionBase->ViewLord);
  21. >>       LoadView(&IntuitionBase->ViewLord);
  22. >>       UnlockIBase(iBaseLock);
  23. >> 
  24. >> and indeed I haven't managed to crash my machine with this code yet
  25. >I think when I posted it I had the stuff inside a Forbid().  Is that
  26. >an adequate substitute for LockIBase?  Maybe those who got crashes
  27. >didn't Forbid.  LockIBase is clearly a more optimal approach though,
  28. >if it really works.
  29. >Now the question is, if this DOES really work, why the heck is
  30. >RethinkDisplay so damn slow?????
  31. NEVER EVER EVER EVER do anything like the above.  I don't care if
  32. you call Forbid(), LockIBase(), Disable(), or if you have a note
  33. from your mother.  Intuition uses layers and graphics constructs
  34. to produce its display.  If you want the convenience of Intuition,
  35. you must use the Intuition functions that manipulate those constucts
  36. (in your case, RethinkDisplay()).  If you think you want to do direct
  37. manipulation of views/viewports, you must implement your own view and
  38. vieports.
  39.  
  40. You cannot use MrgCop()/MakeVPort() on an Intuition screen or screens.
  41. Period.  This method is not endorsed and is problematic.
  42.  
  43. We didn't put delay loops in RethinkDisplay(), you know.  It takes
  44. a while to execute because there is work to do.
  45.  
  46.      Peter
  47. --
  48. Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc.
  49. {uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
  50. My opinions do not necessarily represent the opinions of my employer.
  51. "No guts, no glory."
  52.