Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!emory!hubcap!gatech!prism!shangri-la.gatech.edu!robert From: robert@shangri-la.gatech.edu (Robert Viduya) Newsgroups: comp.windows.x Subject: Re: fast, flicker-free animation, how? Message-ID: <16246@hydra.gatech.EDU> Date: 2 Nov 90 02:35:28 GMT References: <16223@hydra.gatech.EDU> <7898@adobe.UUCP> Sender: news@prism.gatech.EDU Organization: Office of Information Technology, Georgia Tech Lines: 35 >asente@adobe.com (Paul Asente) (asente@adobe.com, <7898@adobe.UUCP>): > In article <16223@hydra.gatech.EDU> robert@shangri-la.gatech.edu (Robert Viduya) writes: > > > > Draw into an offscreen pixmap and then use XCopyArea to put it > > into the window. This is the slowest and I get about 4 frames > > per second. It does, however, produce no annoying flicker. > > How big is your image? Unless your X implementation is extremely bad, you > should be able to do much better than 4 frames per second this way for > "moderate" sized windows (say, 400x400). The image is 800x800 and since it's an 8-bit deep visual, XCopyArea has to move 640K bytes of data. I'm not sure if the cg3 framebuffer is natively an XYPixmap or a ZPixmap. I would hope it's a ZPixmap, but the way it updates windows seems to indicate that it's an XYPixmap. Whenever an entire window gets drawn, like when an xterm scrolls or an XCopyArea for the whole window is done, there are two small areas, one on the extreme left and one on the extreme right that get updated AFTER the rest of the window is updated. The areas extend to the full height of the window and the width seems to vary depending on where the window is on the screen. This leads me to suspect that the server is having to do some sort of data alignment; it moves bytes when it can and then moves bits when it has to. It shouldn't have to do this on an 8-bit deep, ZPixmap type framebuffer since every pixel would be on a byte boundary. It WOULD have to do it on an 8-bit deep, XYPixmap type framebuffer. Oh yes, the width of the two areas is sometimes larger than 4 pixels, so I don't think it's aligning bytes to word-moves. robert -- Robert Viduya robert@shangri-la.gatech.edu Technical Services / Office of Information Technology Georgia Institute of Technology (404) 894-6296 Atlanta, Georgia 30332-0275