(unknown charset) Re: Slow screen restore under BlackBox

From: (unknown charset) [at]} <pfister{>
Date: Sat, 27 Feb 1999 20:55:29 +0100

>Q: I want to know when my view is being resized in order to set some
>"dirty" bit. Which message should I watch? It is one of ctrl messages,
>but I do not know which one. Any idea anybody?

There is no special message for this purpose. Surprisingly,
most views don't need such a feature. It may be useful for some
optimizations, but then it is easy to detect a change in size
using view.context.GetSize(w, h) and comparing w/h with the
old values.

>Now the complaint: I am rather unhappy with BB window restore mechanism.
>
>When a window gets obscured by other windows, and then gets brought
>to the front, my Restore is still called. I would expect it not to be
>called,
>but the cached bitmap should be recalled from some buffer instead.
>Am I right?

No. There is no cached bitmap. During the restoration process, BlackBox
uses a temporary background bitmap to eliminate flickering. But this
is something different; windows are not permanently buffered. Even with
today's large memory sizes, having a buffer for every open window
would be a doubtful approach: imagine having twenty windows open
on a true color display... A few years ago, this was clearly out of the
question.

The BlackBox restore mechanism is by no means special to BlackBox
(or to the Oberon systems of ETH); it's the standard approach shared
with Mac OS, Windows, etc. The same is true for the lazy
update mechanism of BlackBox. Both are proven and well-known
mechanisms.

Unlike Java, we never have attempted to support all conceivable
display features in a portable way. Thus, if one needs special
features, or particularly fast access to some features, it is
possible to access the underlying host platform. For
example, frame.rider.Base()(HostPorts.Port).dc is the
device context of the frame, and can be used for calling
Windows API functions.

For an example on how to buffer a view with a Windows bitmap,
see example ObxBitmap.

Cuno Pfister

Oberon microsystems, Inc.
Received on Sat Feb 27 1999 - 20:57:06 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:42 UTC