Implementation techniques - threaded code and such...

Andreas Raab raab at isgnw.cs.Uni-Magdeburg.DE
Sun Feb 15 12:34:55 UTC 1998


> One question I was asking myself about Morphic double-buffering is this
> one : is this really a double buffering scheme, or a triple buffering ?

Good question. There are really three layers, the first being the actual
contents displayed on the screen the second Squeak's Display and the third
the back buffer for drawing in Squeak. But I would still call it
double-buffering because the updates from Display to the screen are (more
or less) transparent to Squeak. And in computer animation we tend to speak
of double-buffering if a complete frame is drawn in a back buffer before
it becomes visible (even if bitblitting is part of the drawing process).

> Because as far as I understand the source and morphic, there is a buffer
> in the host OS for the squeak window, and a buffer for Morphic inside
> Squeak.

Depends. In the Windows port there is no explicit buffer in the
VM and the graphics hardware doesn't buffer the complete Display. In this
sense there is a temporary buffer in the host OS (on the graphics card)
but this is only used for refreshing your screen.

> And so, displaying something on the screen involves blitting on
> Morphic buffer (a Form), then copying all or parts of this buffer to the
> host OS buffer, and then to the screen to make something appear. Is this
> description right or wrong ?

Your description is right.

> The blitting process is quite an important factor in Morphic speed and
> responsiveness.

Absolutely.

> I went from Windows95 to Linux/X11 on the same hardware
> and gained around 30% in updates in the example "play with me 3" (squeak
> 1.30).

"Play with me - 3" is a good example for how an optimization in one place
can be wrong in another ;-) The deferred display update in the windows VM
leads in this particular case to huge update regions because you have a
number of relatively small update areas in different places. Also, the
frame rate in Morphic is heavily influenced by polling delay in the VM.
If you need proof add a frame rate morph and press any mouse button.
The frame rate should rapidly go up.

Andreas
-- 
Linear algebra is your friend - Trigonometry is your enemy.
+===== Andreas Raab ============= (raab at isg.cs.uni-magdeburg.de) =====+
I Department of Simulation and Graphics      Phone: +49 391 671 8065  I
I University of Magdeburg, Germany           Fax:   +49 391 671 1164  I
+=============< http://isgwww.cs.uni-magdeburg.de/~raab >=============+





More information about the Squeak-dev mailing list