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

  1. Path: sparky!uunet!cs.utexas.edu!swrinde!mips!apple!apple!netcomsv!terapin!paulk
  2. From: paulk@terapin.com (Paul Kienitz)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: MakeScreen(); RethinkDisplay() vs. MakeVPort(); MrgCop(); LoadView()
  5. Message-ID: <paulk.0ucw@terapin.com>
  6. Date: 22 Jul 92 02:31:14 GMT
  7. References: <1b5c1b9e.ARN5a25@moria.UUCP>
  8. Organization: BBS
  9. Lines: 47
  10.  
  11. > Paul Kienitz recently (on July 5) claimed that the following code:
  12. >       MakeScreen(screen);
  13. >       RethinkDisplay();
  14. > could be replaced with:
  15. >       MakeVPort(&IntuitionBase->ViewLord, &screen->ViewPort);
  16. >       MrgCop(&IntuitionBase->ViewLord);
  17. >       LoadView(&IntuitionBase->ViewLord);
  18. > without any Intuition compatibility problems whatsoever.
  19.  
  20. That I had experienced.  I have since heard of several people having
  21. trouble, though.
  22.  
  23. > The code violates
  24. > the rule that you should lock IntuitionBase while mucking with the fields.
  25. > So a more correct method would appear to be this:
  26. >       ULONG iBaseLock = LockIBase(0);
  27. >       MakeVPort(&IntuitionBase->ViewLord, &screen->ViewPort);
  28. >       MrgCop(&IntuitionBase->ViewLord);
  29. >       LoadView(&IntuitionBase->ViewLord);
  30. >       UnlockIBase(iBaseLock);
  31. > and indeed I haven't managed to crash my machine with this code yet
  32.  
  33. I think when I posted it I had the stuff inside a Forbid().  Is that
  34. an adequate substitute for LockIBase?  Maybe those who got crashes
  35. didn't Forbid.  LockIBase is clearly a more optimal approach though,
  36. if it really works.
  37.  
  38. Now the question is, if this DOES really work, why the heck is
  39. RethinkDisplay so damn slow?????
  40.  
  41. > Now I wonder whether this method is endorsed at all by Commodore.
  42. > My hunch is that it isn't, but I would like to hear the official
  43. > word on this :-)
  44.  
  45. Me too.
  46.  
  47. Note that it was not me who originally suggested it -- I was just repeating
  48. someone else's suggestion which had worked for me -- sped up my little program
  49. enough to put back in some WaitTOFs which had been taken out because
  50. RethinkDisplay was slow enough to eat a whole frame.
  51.