Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!rutgers!bpa!cbmvax!peter From: peter@cbmvax.commodore.com (Peter Cherna) Newsgroups: comp.sys.amiga.tech Subject: Re: gimmezerozero Message-ID: <10055@cbmvax.commodore.com> Date: 8 Mar 90 17:31:14 GMT References: <6fw=02eZ8fOn01@amdahl.uts.amdahl.com> Reply-To: peter@cbmvax (Peter Cherna) Organization: Commodore, West Chester, PA Lines: 49 In article <6fw=02eZ8fOn01@amdahl.uts.amdahl.com> dwl10@uts.amdahl.com (Dave Lowrey) writes: >The following quote is from the RKM: Libraries & Devices ....... >"The Gimmezerozero window uses more RAM than other window types, and >degrades performance in the moving and sizing of windows. There can be a >noticeable performance lag, especially when several Gimmezerozero >windows are open at the same time." > >My question.... How bad is the "performance degredation". Pretty bad. Fire up AmigaBASIC sometime and check it out. Basically, what happens is that under the concept of windows there is a concept of layers. Very crudely speaking, a window is a layer with borders and system gadgets added. The gadgets are ways to control the layer, like move it, size it, depth arrange it, etc. Now all clipping is done to layer boundaries. Notice that you can render pretty carelessly and you'll never go outside of your own window (unless that was your goal). However you can trash your own window borders, since they're in the same layer as your rendering. GimmeZeroZero windows were a way around that, and what they do is give you two layers for your window, the regular layer that is the size of the window (into which window borders and border gadgets get rendered) and an inner layer that is smaller on all sides by the border thickness. When you render into the inner layer, there are two benefits: You can't trash your own borders. The upper left of your usable area is (0,0) (hence the name). The extra layer that this generates makes the system slow down. The two benefits can be obtained in standard ways. You can always look at your window->BorderTop and window->BorderLeft, and use those as the origin of your rendering (instead of (0,0)). The clipping can be handled using InstallClipRegion() from graphics.library. >I get the distinct impression that "Real programmers don't use >Gimmezerozero windows!". Not any more they don't. >-- > this is Genocide!" |Dave Lowrey - Amdahl Corp. - Houston, TX Peter -- Peter Cherna, Software Engineer, Commodore-Amiga, Inc. {uunet|rutgers}!cbmvax!peter peter@cbmvax.cbm.commodore.com My opinions do not necessarily represent the opinions of my employer.