From: beck@irzr17.inf.tu-dresden.de (Andre Beck)
Subject: Re: Animation with XPutImage()?
Organization: Dept. of Computer Science, TU Dresden, Germany.
Lines: 37
Distribution: world
Reply-To: Andre_Beck@IRS.Inf.TU-Dresden.DE
NNTP-Posting-Host: irzr17.inf.tu-dresden.de


In article <1993Apr21.154620.16330@infodev.cam.ac.uk>, dcr@mail.ast.cam.ac.uk (Derek C. Richardson) writes:

|> Two years ago I wrote a Sunview application for fast animation
|> of raster files. With Sunview becoming rapidly obselete, I've
|> finally decided to rewrite everything from scratch in XView.
|> I put together a quick test, and I've found that XPutImage()
|> is considerably slower (factor of 2 on average?) than the
|> Sunview command pw_rop() which moves image data from memory
|> pixrects to a canvas. This was on a Sparc IPX. It seems that:
|> (1) the X protocol communication is slowing things down; or
|> (2) XPutImage is inefficient...or both! My question is, what

The protocol has to move the whole image from process memory to server
memory, this is the hog. The conversions in the XPutImage() are
fast.

|> is the fastest way in X11R5 to dump 8 plane image data to
|> a window? Can I take advantage of the fact that the client is
|> running on the same machine as the server? Or am I stuck with

Yes, by utilizing the MIT-SHM extension, that provides an XPutImage
derivate that uses shared memory. Fine fast.

|> XPutImage() (in which case I might as well give up now...)?
|> 

No. You can still XPutImage all of the frames onto pixmaps (thus moving
them to server memory) and then replay them fastest using XCopyArea()
BUT be aware, this is a major server memory bummer !

--
+-o-+--------------------------------------------------------------+-o-+
| o |                \\\-  Brain Inside -///                       | o |
| o |                    ^^^^^^^^^^^^^^^                           | o |
| o | Andre' Beck (ABPSoft) mehl: Andre_Beck@IRS.Inf.TU-Dresden.de | o |
+-o-+--------------------------------------------------------------+-o-+
