Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!gatech!mcnc!kk From: kk@mcnc.org (Krzysztof Kozminski) Newsgroups: comp.sys.mac.programmer Subject: Usefulness of off-screen ports (was: turning on a pixel) Message-ID: <1357@speedy.mcnc.org> Date: 25 Aug 89 12:31:51 GMT References: <6294@hubcap.clemson.edu> <227700031@uxa.cso.uiuc.edu> <30894@ucbvax.BERKELEY.EDU> Reply-To: kk@mcnc.org.UUCP (Krzysztof Kozminski) Organization: Microelectronics Center of NC; RTP, NC Lines: 23 In article <30894@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) writes: >Conclusion: directly bit-twiddle an off-screen bitmap, then call CopyBits >to display it for you. It will save you much present pain, and still more >future pain. One more thing it may do is to speed up the screen refresh times. From my experiments, drawing rectangles and line segments into a bitmap that has rectangular clipRgn and visRgn is ~30% faster than doing the same drawing into a bitmap with either of these regions composed of two abutting rectangles (as you're likely to have if your window has its corner overlapped by another window). In one case, I managed to get 60-fold speedup of drawing (yup, that's sixty) by drawing into off-screen pixmap (with my own routines - no QD calls since I knew I did not have to clip anything and needed a nonstandard color merging mode) and then CopyBiting it. Summary: Off-screen bitmaps are great! KK -- Kris Kozminski kk@mcnc.org "The party was a masquerade; the guests were all wearing their faces."