Xext: Move MIT-SHM 'ShmDesc' to shmint.h
This data structure is required to use shared memory objects in any extension. That includes the Xv extension, which (before this patch) duplicated the definition of this structure in its own code. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
2eedf42c22
commit
7710f2b927
|
@ -89,15 +89,6 @@ in this Software without prior written authorization from The Open Group.
|
||||||
|
|
||||||
#include "extinit.h"
|
#include "extinit.h"
|
||||||
|
|
||||||
typedef struct _ShmDesc {
|
|
||||||
struct _ShmDesc *next;
|
|
||||||
int shmid;
|
|
||||||
int refcnt;
|
|
||||||
char *addr;
|
|
||||||
Bool writable;
|
|
||||||
unsigned long size;
|
|
||||||
} ShmDescRec, *ShmDescPtr;
|
|
||||||
|
|
||||||
typedef struct _ShmScrPrivateRec {
|
typedef struct _ShmScrPrivateRec {
|
||||||
CloseScreenProcPtr CloseScreen;
|
CloseScreenProcPtr CloseScreen;
|
||||||
ShmFuncsPtr shmFuncs;
|
ShmFuncsPtr shmFuncs;
|
||||||
|
|
|
@ -56,6 +56,15 @@ typedef struct _ShmFuncs {
|
||||||
void (*PutImage) (XSHM_PUT_IMAGE_ARGS);
|
void (*PutImage) (XSHM_PUT_IMAGE_ARGS);
|
||||||
} ShmFuncs, *ShmFuncsPtr;
|
} ShmFuncs, *ShmFuncsPtr;
|
||||||
|
|
||||||
|
typedef struct _ShmDesc {
|
||||||
|
struct _ShmDesc *next;
|
||||||
|
int shmid;
|
||||||
|
int refcnt;
|
||||||
|
char *addr;
|
||||||
|
Bool writable;
|
||||||
|
unsigned long size;
|
||||||
|
} ShmDescRec, *ShmDescPtr;
|
||||||
|
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
|
ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ SOFTWARE.
|
||||||
#include "xvdix.h"
|
#include "xvdix.h"
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
#include <X11/extensions/shmproto.h>
|
#include <X11/extensions/shmproto.h>
|
||||||
|
#include "shmint.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "xvdisp.h"
|
#include "xvdisp.h"
|
||||||
|
@ -949,18 +950,6 @@ ProcXvPutImage(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
/* redefined here since it's not in any header file */
|
|
||||||
typedef struct _ShmDesc {
|
|
||||||
struct _ShmDesc *next;
|
|
||||||
int shmid;
|
|
||||||
int refcnt;
|
|
||||||
char *addr;
|
|
||||||
Bool writable;
|
|
||||||
unsigned long size;
|
|
||||||
} ShmDescRec, *ShmDescPtr;
|
|
||||||
|
|
||||||
extern RESTYPE ShmSegType;
|
|
||||||
extern int ShmCompletionCode;
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcXvShmPutImage(ClientPtr client)
|
ProcXvShmPutImage(ClientPtr client)
|
||||||
|
|
Loading…
Reference in New Issue