Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!sgi!daisy!rob From: rob@daisy.UUCP (Rob Posadas) Newsgroups: comp.windows.x Subject: Re: backing store Message-ID: <1345@daisy.UUCP> Date: 7 Jul 88 20:53:18 GMT References: <8807051918.AA21487@hpfcjrd.sde.hp.com> <19880705200523.3.RWS@KILLINGTON.LCS.MIT.EDU> <156@quintus.UUCP> Reply-To: rob@daisy.UUCP (Rob Posadas) Organization: Daisy Systems Corp., Mountain View, Ca. Lines: 43 In article <156@quintus.UUCP> pds@quintus.UUCP (Peter Schachte) writes: > >There's one thing I don't understand about the argument against allowing >programmers to insist on backing store. As I understand it, the > ... >is that if I'm not guaranteed backing store, I have to ask for a pixmap >the size of the window, anyway. And if I can't get it, my program is > Why? Typically what is done is for the client to keep a display list of the objects that it has drawn on the screen. To refresh it runs through the display list and redraws each object. You shouldn't have to ask for a pixmap the size of the window unless you are implementing your own version of backing-store. >back up my entire window. But a server that has fast and slow memory >(e.g., a hard disk) could set aside slow memory, but use fast memory to >back up small parts of my window when only a little of it is hidden. >This could make for better performance. This would also make for a very complicated backing-store algorithm. The easiest implementation is to allocate a pixmap the size of the window as you suggested earlier. Then at a fairly high level in the server code, the server can just perform each output primitive twice. Once to the screen and one to the off-screen pixmap. It would always refresh from the off-screen pixmap and use the off-screen pixmap for XGetImage. If the server has to also maintain small pixmaps for just the occluded portion it would need the intelligence to run through a list of small pixmaps (remember, the window may be occluded in more than one place). What if you need to CopyArea from a piece that is in two small pixmaps and drop it on a piece that has has two other small pixmaps. Things start getting complicated very quickly. Whether or not it is all worth it is up to the individual server implementator. -- Rob Posadas -- Daisy Systems Corp 700 E. Middlefield Rd. Mt. View, CA 94039-7006 ucbvax!imagen!atari!daisy!rob