home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!topaz.bds.com!topaz.bds.com!ron
- From: ron@topaz.bds.com (Ron Natalie)
- Newsgroups: comp.graphics
- Subject: Re: How to make *shared-memory* Pixmaps on Sun 4?
- Date: 20 Dec 1992 16:22:54 GMT
- Organization: BDS Systems
- Lines: 24
- Distribution: world
- Message-ID: <1h26kuINN784@topaz.bds.com>
- References: <9212171848.aa16515@Paris.ics.uci.edu> <tp3c8bg@zuni.esd.sgi.com> <RBERLIN.92Dec18225118@birdland.Eng.Sun.COM>
- NNTP-Posting-Host: topaz.bds.com
-
- You have to be careful. There are two facilities provided by the
- MIT-SHM extension. The first is XShmPutImage. This essentially does
- the XPutImage call from the shared memory region by copying to the
- destination drawable. The other is a real Shared Memory pixmap that
- makes an X Drawable out of a piece of shared memory.
-
- The former is implemented entirely in the extension. No ddx code is used.
- Hence, all you have to do is -DMITSHM when you compile and you get it.
- The turning of shared memory into a PIXMAP requires colusion with other
- DDX code regarding Pixmap allocation. This is not easy to do in all cases.
- I spent some time doing this with the HP server which uses a separate module
- called GRM to manage all the server memory and had to teach it how to allow
- X to pass in a chunk of memory allocated outside of GRM to use as server
- memory.
-
- The distinction between the two is pretty minor. If you are solely after
- better bandwidth to the screen, XShmPutImage is OK. If you want to do
- fancier stuff like drawing into pixmaps outside of X or peeking into them
- with out doing a GetImage, then you'll need to make sure that the server
- supports that. The test program in extensions/test/shmtest.c will tell
- you. If it comes up with only one window, it doesn't have the shared pixmap
- part of the extension in the server in use.
-
- -Ron
-