SELECT type FROM
none => used internally.
clearArea => area is the area to be cleared.
paintArea => area is the area to be painted. The object to be painted is in data. Sequentiality of paintArea requests is guaranteed.
clearAndPaint => short cut for clearArea followed by paintArea.
scale => change of context. New context transformation is data. All previous paintArea requests are discarded. Usually foolowed by a clear and repaint of the whole viewer. When dequeued, the effect is usually to change the viewer context.
other => other request, undisturbed by any optimization, and sequential. Fileds data and area might be used.
QueueRec:
PRIVATE
TYPE =
MONITORED
RECORD [
start: NAT, -- first request to be unqueued
size: NAT, -- number of requests to be unqueued
requests: REF Requests -- grows as queue fills
];
Enqueue:
PROC [queue: Queue, request: Request, reverse:
BOOL ←
FALSE];
reverse argument allows stopping by enqueuing to do requests.
Monitored.
Optimizes queue:
clearArea are composed with previous paintArea and clearArea;
paintArea are composed with previous paintArea with the same data;
scale get rid of previous paintArea and clearArea;
other is left undisturbed.