Merge remote-tracking branch 'ajax/xserver-next'

This commit is contained in:
Keith Packard 2015-05-11 16:34:48 -07:00
commit c39c3a9750
4 changed files with 15 additions and 2 deletions

View File

@ -260,7 +260,7 @@ ShmDestroyPixmap(PixmapPtr pPixmap)
pScreen->DestroyPixmap = ShmDestroyPixmap; pScreen->DestroyPixmap = ShmDestroyPixmap;
if (shmdesc) if (shmdesc)
ShmDetachSegment(shmdesc, pPixmap->drawable.id); ShmDetachSegment(shmdesc, 0);
return ret; return ret;
} }
@ -427,7 +427,7 @@ ProcShmAttach(ClientPtr client)
/*ARGSUSED*/ static int /*ARGSUSED*/ static int
ShmDetachSegment(void *value, /* must conform to DeleteType */ ShmDetachSegment(void *value, /* must conform to DeleteType */
XID shmseg) XID unused)
{ {
ShmDescPtr shmdesc = (ShmDescPtr) value; ShmDescPtr shmdesc = (ShmDescPtr) value;
ShmDescPtr *prev; ShmDescPtr *prev;
@ -971,6 +971,12 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
stuff->offset); stuff->offset);
if (pMap) { if (pMap) {
result = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid,
RT_PIXMAP, pMap, RT_NONE, NULL, DixCreateAccess);
if (result != Success) {
pDraw->pScreen->DestroyPixmap(pMap);
return result;
}
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc); dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
shmdesc->refcnt++; shmdesc->refcnt++;
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;

View File

@ -936,6 +936,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
size_t buffer_size; size_t buffer_size;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
if (!enableIndirectGLX)
return NULL;
screen = calloc(1, sizeof *screen); screen = calloc(1, sizeof *screen);
if (screen == NULL) if (screen == NULL)
return NULL; return NULL;

View File

@ -745,6 +745,8 @@ xf86CompatOutput(ScrnInfoPtr pScrn)
{ {
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
if (config->compat_output < 0)
return NULL;
return config->output[config->compat_output]; return config->output[config->compat_output];
} }

View File

@ -52,6 +52,8 @@ SOFTWARE.
#error xserver code must include dix-config.h before any other headers #error xserver code must include dix-config.h before any other headers
#endif #endif
#include <X11/Xarch.h> /* for X_LITTLE_ENDIAN/X_BIG_ENDIAN */
#if X_BYTE_ORDER == X_LITTLE_ENDIAN #if X_BYTE_ORDER == X_LITTLE_ENDIAN
#define IMAGE_BYTE_ORDER LSBFirst #define IMAGE_BYTE_ORDER LSBFirst
#define BITMAP_BIT_ORDER LSBFirst #define BITMAP_BIT_ORDER LSBFirst