diff options
author | marha <marha@users.sourceforge.net> | 2013-11-25 12:10:25 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-11-25 12:10:25 +0100 |
commit | 0f333fb1102f4886a8ce39f3c09b12e89e5a7f19 (patch) | |
tree | 8239768e506a03837019c4f02c8ab949c04a0818 /xorg-server/miext/sync/misyncshm.c | |
parent | 7dbaa1cffdf176f803f2c7069fb6810e16a86f72 (diff) | |
parent | a473b885d641b9c1ea57f2ae53f9ba7f2958cce2 (diff) | |
download | vcxsrv-0f333fb1102f4886a8ce39f3c09b12e89e5a7f19.tar.gz vcxsrv-0f333fb1102f4886a8ce39f3c09b12e89e5a7f19.tar.bz2 vcxsrv-0f333fb1102f4886a8ce39f3c09b12e89e5a7f19.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
libX11 xserver mesa libXinerama libXmu mkfontscale git update 25 nov 2013
Conflicts:
libXinerama/src/Xinerama.c
Diffstat (limited to 'xorg-server/miext/sync/misyncshm.c')
-rw-r--r-- | xorg-server/miext/sync/misyncshm.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/xorg-server/miext/sync/misyncshm.c b/xorg-server/miext/sync/misyncshm.c index ddd15ae49..3f9350af5 100644 --- a/xorg-server/miext/sync/misyncshm.c +++ b/xorg-server/miext/sync/misyncshm.c @@ -28,6 +28,7 @@ #include "misync.h" #include "misyncstr.h" #include "misyncshm.h" +#include "misyncfd.h" #include "pixmapstr.h" #include <sys/mman.h> #include <unistd.h> @@ -118,13 +119,12 @@ miSyncShmScreenDestroyFence(ScreenPtr pScreen, SyncFence * pFence) miSyncScreenDestroyFence(pScreen, pFence); } -int -miSyncInitFenceFromFD(DrawablePtr pDraw, SyncFence *pFence, int fd, BOOL initially_triggered) - +static int +miSyncShmCreateFenceFromFd(ScreenPtr pScreen, SyncFence *pFence, int fd, Bool initially_triggered) { SyncShmFencePrivatePtr pPriv = SYNC_FENCE_PRIV(pFence); - miSyncInitFence(pDraw->pScreen, pFence, initially_triggered); + miSyncInitFence(pScreen, pFence, initially_triggered); pPriv->fence = xshmfence_map_shm(fd); if (pPriv->fence) { @@ -136,8 +136,8 @@ miSyncInitFenceFromFD(DrawablePtr pDraw, SyncFence *pFence, int fd, BOOL initial return BadValue; } -int -miSyncFDFromFence(DrawablePtr pDraw, SyncFence *pFence) +static int +miSyncShmGetFenceFd(ScreenPtr pScreen, SyncFence *pFence) { SyncShmFencePrivatePtr pPriv = SYNC_FENCE_PRIV(pFence); @@ -154,11 +154,17 @@ miSyncFDFromFence(DrawablePtr pDraw, SyncFence *pFence) return pPriv->fd; } +static const SyncFdScreenFuncsRec miSyncShmScreenFuncs = { + .version = SYNC_FD_SCREEN_FUNCS_VERSION, + .CreateFenceFromFd = miSyncShmCreateFenceFromFd, + .GetFenceFd = miSyncShmGetFenceFd +}; + _X_EXPORT Bool miSyncShmScreenInit(ScreenPtr pScreen) { SyncScreenFuncsPtr funcs; - if (!miSyncSetup(pScreen)) + if (!miSyncFdScreenInit(pScreen, &miSyncShmScreenFuncs)) return FALSE; if (!dixPrivateKeyRegistered(&syncShmFencePrivateKey)) { @@ -171,6 +177,7 @@ _X_EXPORT Bool miSyncShmScreenInit(ScreenPtr pScreen) funcs->CreateFence = miSyncShmScreenCreateFence; funcs->DestroyFence = miSyncShmScreenDestroyFence; + return TRUE; } |