Contained Within
Find More Documentation
Featured Support Resources
| PDF로 이 문서 다운로드
MIT Shared Memory Extension
15
- This chapter describes the functions that a ddx handler may call to enable full functionality of the MIT Shared Memory (MIT_SHM) extension. This extension is an MIT standard that is distributed with X11 Release 5 (X11R5).
- The MIT_SHM extension is a version of the ximage interface where the actual image data is stored in a shared memory segment. This extension can yield a significant increase in performance for large images.
- The following document is part of the MIT_SHM extension, and is online in the doc/hardcopy/Xext directory.
-
-
MIT_SHM - The MIT Shared Memory Extension, Jonathan Corbet, formatted and edited for release 5 by Keith Packard, MIT X Consortium.
MIT Shared Memory Interface
- All ddx handlers may use the following functions to implement the MIT Shared Memory extension.
-
Table 15-1
| Function Name | Description |
| ShmRegisterFbFuncs | Registers the cfb-compatible functions. The ddx handler must accept fake pixmaps. Fake pixmaps are pixmaps with devPrivates initialized to NULL and an internal format compatible with cfb. Note that ShmRegisterFbFuncs is called in mpgScreenInit and miScreenInit, so if your handler calls either of these functions, no other work is required. |
| ShmRegisterFuncs | Registers the specified shared memory function vectors. Note that to enable creation of shared memory pixmaps, you must use ShmRegisterFuncs or ShmRegisterFbFuncs. |
| ShmSetPixmapFormat | Registers the specified pixmap format. |
ShmRegisterFbFuncs
-
void ShmRegisterFbFuncs(ScreenPtr pScreen)
|
-
| Purpose | This function is provided to register the predefined shared memory functions. The predefined ShmFuncs record is registered as follows: |
| ShmFuncs fbFuncs={fbShmCreatePixmap, fbShmPutImage}; |
| Called by | This function is called during device screen initialization. |
| Results | This function initializes the shmFuncs array indexed by the specified screen number with the ShmFuncs record. |
| Returns | None. |
ShmRegisterFuncs
-
void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs)
|
-
| Purpose | This function is provided to register the shared memory functions. The ShmFuncsPtr has been defined as follows: |
| typedef struct _ShmFuncs { |
| Called by | This function is called during device screen initialization. |
| Results | This function initializes the shmFuncs array indexed by the specified screen number with funcs. |
| ReturnsShmSetPixmapFormat | None. |
| void ShmSetPixmapFormat(ScreenPtr pScreen, int format) |
| Purpose | This function is provided to register the shared memory pixmap format. The valid pixmap formats are XYPixmap, XYBitmap or ZPixmap. |
| Called by | This function is called during device screen initialization. |
| Results | This function initializes the shmPixFormat array indexed by the specified screen number with format. |
| Returns | None. |
|
|