Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!lll-tis!ames!hao!boulder!sunybcs!bingvaxu!leah!itsgw!imagine!pawl17.pawl.rpi.edu!jesup From: jesup@pawl17.pawl.rpi.edu (Randell E. Jesup) Newsgroups: comp.sys.amiga Subject: Re: Feeping Creaturism Message-ID: <546@imagine.PAWL.RPI.EDU> Date: 18 Mar 88 06:50:32 GMT References: <8802181921.AA19069@cory.Berkeley.EDU> <682@sandino.quintus.UUCP> <5295@utah-cs.UUCP> <732@nuchat.UUCP> <7599@apple.Apple.Com> <2122@polya.STANFORD.EDU> <1451@csib.csi.UUCP> Sender: news@imagine.PAWL.RPI.EDU Reply-To: beowulf!lunge!jesup@steinmetz.UUCP Organization: RPI Public Access Workstation Lab - Troy, NY Lines: 39 In article <1451@csib.csi.UUCP> jwhitnel@csib.UUCP (Jerry Whitnell) writes: [ Re: Mac, Amiga, and smart_refresh ] > However, the programmer still >has the option of saving bit maps at window deactivation and restoring it >when it is reactivated, but it is up to the programmer to decide to use >memory that way. I'm not familiar with the Amiga, so I'd like to know how >do you as a programmer handle the memory requirments for the bit maps for a >large number of windows? Amiga windows (in term of refresh) are either SIMPLE (like mac), SMART (saves obscured areas for you), or SUPERBITMAP (refreshed automatically from a large, off-screen bitmap). For SMART_REFRESH windows, all the saving of non-visible portions is done automatically by the system (and restoration as well). The save areas are dynamicly allocated by the system, and freed when no longer needed. If you have a LARGE number of SMART_REFRESH windows, and they cover each other, it will use more memory. In general, this isn't a problem. Many applications open 'screens', which are essentially entire seperate displays, each of which can have it's own windows. Screens require ram also, dependant on their size (x & y), and their color depth. For example, the MicroEmacs I use opens a 640x200 monochrome screen, which requires 16K. If it opened a window on the Workbench, and it totally covered a SMART_REFRESH window, that would require 32K. However, if it covered a SIMPLE_REFRESH window, or it didn't overlap a SMART_REFRESH window, it would require 0K. Partial overlaps are in between. Choosing SMART_REFRESH vs SIMPLE_REFRESH has some tradeoffs. One is programming ease/complexity: SMART_REFRESH is VERY easy to handle, as you can continue to do stuff without worrying wether you should check to see if the window needs refreshing. Your code is smaller, simpler, easier to maintain. Also, for ports of things like UNIX software, it makes life SO MUCH easier. The downside is memory consumption. On a high-res, many color display, overlapping windows will cost you quite a bit of memory. // Randell Jesup Lunge Software Development // Dedicated Amiga Programmer 13 Frear Ave, Troy, NY 12180 \\// beowulf!lunge!jesup@steinmetz.UUCP (518) 272-2942 \/ (uunet!steinmetz!beowulf!lunge!jesup) BIX: rjesup (-: The Few, The Proud, The Architects of the RPM40 40MIPS CMOS Micro :-)