Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!olivea!isc-br!jimc From: jimc@isc-br.ISC-BR.COM (Jim Cathey) Newsgroups: comp.sys.mac.programmer Subject: Re: Optimizing animation processing speed Message-ID: <3090@isc-br.ISC-BR.COM> Date: 21 May 91 21:28:58 GMT References: <1776@babcock.cerc.wvu.wvnet.edu> <8996@ucdavis.ucdavis.edu> <1991May18.231302.16630@nntp-server.caltech.edu> Organization: ISC-Bunker Ramo, An Olivetti Company Lines: 33 In article <1991May18.231302.16630@nntp-server.caltech.edu> palmer@nntp-server.caltech.edu (David Palmer) writes: >Do an 'InvalRect()' on the place where you remove the icons, and on the >new location of the icon. Then when you respond to an 'update' event, >just write the background and the icons. This does what you suggested-- >only writing to the invalidated regions. Yuck. Sort of like writing yourself a note to buy eggs on Friday, and then putting a stamp on it and your own address and dropping it into the mailbox instead of leaving it on the refrigerator! If you know you need to draw the icons, then just draw the icons. Why invoke a whole bunch of region math when you don't need to, especially when it's just going to tell you what you already knew? It will certainly be slower. >The Macintosh Way is to not write anything to the screen except during >update events. I disagree. The Way is to write on the screen whenever necessary (though it's not necessary more often than once per VSYNC time per item) _and_ to write (everything dirty) on the screen during update events --- not 'instead of'. The same goes for a lot of GUI systems. +----------------+ ! II CCCCCC ! Jim Cathey ! II SSSSCC ! ISC-Bunker Ramo ! II CC ! TAF-C8; Spokane, WA 99220 ! IISSSS CC ! UUCP: uunet!isc-br!jimc (jimc@isc-br.isc-br.com) ! II CCCCCC ! (509) 927-5757 +----------------+ "With excitement like this, who is needing enemas?"