pixrect help

Kemp at dockmaster.arpa Kemp at dockmaster.arpa
Thu Mar 9 13:22:10 AEST 1989


>> Question on *slow* operation of pw_put > Advice on proper use of
batch and lock

Proper batching/locking is necessary for performance, but even then
writing individual pixels with pw_put is going to be slow.  If at all
possible, you should create a memory pixrect that points to your array of
data and then copy the whole array to your pixwin.  Of course this assumes
that you want to manipulate a compact region, not scatter a thousand
points of light randomly about the screen.

We have gotten acceptable speed from a 3/60 and excellent speed from a
3/160 with Graphics Processor in an application that scrolls an image (a
spectrogram in this case) by copying the pixwin to itself with a
horizontal offset and then copying in the new data from a memory pixrect.
A 4/280 should be able to do even better.

  Dave Kemp



More information about the Comp.sys.sun mailing list