Path: utzoo!attcan!uunet!mcvax!kth!draken!tut!santra!kampi!jmunkki From: jmunkki@kampi.hut.fi (Juri Munkki) Newsgroups: comp.sys.mac.programmer Subject: Re: Help: Using CopyBits for Update Message-ID: <21931@santra.UUCP> Date: 12 May 89 08:20:43 GMT References: <1617@neoucom.UUCP> <7254@hoptoad.uucp> Sender: news@santra.UUCP Reply-To: jmunkki@kampi.hut.fi (Juri Munkki) Organization: Helsinki University of Technology, Finland Lines: 28 In article <7254@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >Maybe I'm being dense, but what is the advantage to keeping an >offscreen bitmap in a terminal emulator and using it for updates? >Individual updates will go faster. However, you will spend more time >overall in QuickDraw, because what would ordinarily be a one-step >process has a new step added. I used to think this way too. Then I started working on a new terminal emulator and I wanted this one to have really easy updates. The surprising thing is that most users think that the program is better than others because it is faster than any other program they have used...and my program uses an offscreen bitmap. Using the bitmap doesn't seem to matter too much. I keep the bitmap always long-word aligned so that copybits can just blast the bits from the buffer to the screen without shifting them. DrawText always has to do this anyway, so calling DrawText takes much more time than the CopyBits for the same area. I had a very good reason why using the offscreen bitmap might be even faster than drawing directly (in some special cases), but I can't remember it right now. I'll post the reasoning, if I remember it again. Summary: In theory it might be slow, but in practise it doesn't seem to matter. _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ | Juri Munkki jmunkki@hut.fi jmunkki@fingate.bitnet I Want Ne | | Helsinki University of Technology Computing Centre My Own XT | ^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^