[comp.sys.mac.programmer] Usefulness of off-screen ports

kk@mcnc.org (Krzysztof Kozminski) (08/25/89)

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."

boissier@irisa.irisa.fr (franck boissiere,externes ) (08/25/89)

From article <1357@speedy.mcnc.org>, by kk@mcnc.org (Krzysztof Kozminski):
> 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).
>a
Does  anyone know how  clipping is handled for non rectangular clipRgn?
Is it divied into  a collection of rectangles?

Franck
 
Franck BOISSIERE                        boissier@irisa.irisa.fr
Prototyping Lab Manager                 boissier@ccettix.UUCP
C.C.E.T.T.   B.P. 59                    boissier%irisa.irisa.fr@uunet.uu.net
35512 CESSON SEVIGNE CEDEX  FRANCE